feat(net-tool): 添加删除 GitLab Web 钩子功能并优化 del 方法参数
All checks were successful
/ release (push) Successful in 25s
All checks were successful
/ release (push) Successful in 25s
This commit is contained in:
parent
e4f940af49
commit
4bad60d556
@ -24,6 +24,16 @@ class Hook extends GitlabBaseService {
|
|||||||
null
|
null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除 GitLab Web 钩子。
|
||||||
|
* @param {number} hookId 钩子 ID
|
||||||
|
* @returns {Promise<ProjectHookSchema | null>}
|
||||||
|
*/
|
||||||
|
async delete(hookId: number) {
|
||||||
|
const URL = `/projects/${this.project_id}/hooks/${hookId}`
|
||||||
|
return this.errorWarp<ProjectHookSchema | null>(() => this.del(URL), null)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Hook
|
export default Hook
|
||||||
|
@ -313,7 +313,7 @@ class NetToolBase {
|
|||||||
*/
|
*/
|
||||||
protected del<T = any>(
|
protected del<T = any>(
|
||||||
url: string,
|
url: string,
|
||||||
payload: any,
|
payload?: any,
|
||||||
queryParams?: any,
|
queryParams?: any,
|
||||||
additionalHeaders?: any
|
additionalHeaders?: any
|
||||||
): Promise<T> {
|
): Promise<T> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user