Skip to content

Commit ef3e3af

Browse files
GiteaBotsilverwindbilogic
authored
Fix typo in API route (#24310) (#24332)
Backport #24310 by @silverwind Continuation of #23995 Co-authored-by: silverwind <[email protected]> Co-authored-by: bilogic <[email protected]>
1 parent b1094ff commit ef3e3af

File tree

2 files changed

+26
-28
lines changed

2 files changed

+26
-28
lines changed

routers/api/v1/admin/hooks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func EditHook(ctx *context.APIContext) {
145145

146146
// DeleteHook delete a system hook
147147
func DeleteHook(ctx *context.APIContext) {
148-
// swagger:operation DELETE /amdin/hooks/{id} admin adminDeleteHook
148+
// swagger:operation DELETE /admin/hooks/{id} admin adminDeleteHook
149149
// ---
150150
// summary: Delete a hook
151151
// produces:

templates/swagger/v1_json.tmpl

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,31 @@
223223
}
224224
}
225225
},
226+
"delete": {
227+
"produces": [
228+
"application/json"
229+
],
230+
"tags": [
231+
"admin"
232+
],
233+
"summary": "Delete a hook",
234+
"operationId": "adminDeleteHook",
235+
"parameters": [
236+
{
237+
"type": "integer",
238+
"format": "int64",
239+
"description": "id of the hook to delete",
240+
"name": "id",
241+
"in": "path",
242+
"required": true
243+
}
244+
],
245+
"responses": {
246+
"204": {
247+
"$ref": "#/responses/empty"
248+
}
249+
}
250+
},
226251
"patch": {
227252
"consumes": [
228253
"application/json"
@@ -731,33 +756,6 @@
731756
}
732757
}
733758
},
734-
"/amdin/hooks/{id}": {
735-
"delete": {
736-
"produces": [
737-
"application/json"
738-
],
739-
"tags": [
740-
"admin"
741-
],
742-
"summary": "Delete a hook",
743-
"operationId": "adminDeleteHook",
744-
"parameters": [
745-
{
746-
"type": "integer",
747-
"format": "int64",
748-
"description": "id of the hook to delete",
749-
"name": "id",
750-
"in": "path",
751-
"required": true
752-
}
753-
],
754-
"responses": {
755-
"204": {
756-
"$ref": "#/responses/empty"
757-
}
758-
}
759-
}
760-
},
761759
"/markdown": {
762760
"post": {
763761
"consumes": [

0 commit comments

Comments
 (0)