Compare commits
2 Commits
@egg/net-t
...
@egg/net-t
Author | SHA1 | Date | |
---|---|---|---|
73e18db55e | |||
4bad60d556 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -12394,7 +12394,7 @@
|
||||
},
|
||||
"packages/net-tool": {
|
||||
"name": "@egg/net-tool",
|
||||
"version": "1.20.0",
|
||||
"version": "1.21.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@egg/logger": "^1.6.0",
|
||||
|
@ -3,6 +3,12 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.21.0](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/net-tool@1.20.0...@egg/net-tool@1.21.0) (2024-12-20)
|
||||
|
||||
### Features
|
||||
|
||||
- **net-tool:** 添加删除 GitLab Web 钩子功能并优化 del 方法参数 ([4bad60d](http://yingbo.im:3000/zhaoyingbo/egg_tools/commits/4bad60d55625c376286aac6fdec74b8d0e36ac24))
|
||||
|
||||
# 1.20.0 (2024-12-20)
|
||||
|
||||
### Features
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@egg/net-tool",
|
||||
"version": "1.20.0",
|
||||
"version": "1.21.0",
|
||||
"description": "Net Tools for Egg projects",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
@ -24,6 +24,16 @@ class Hook extends GitlabBaseService {
|
||||
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
|
||||
|
@ -313,7 +313,7 @@ class NetToolBase {
|
||||
*/
|
||||
protected del<T = any>(
|
||||
url: string,
|
||||
payload: any,
|
||||
payload?: any,
|
||||
queryParams?: any,
|
||||
additionalHeaders?: any
|
||||
): Promise<T> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user