Skip to content

Commit

Permalink
Fix typo in API route (#24310) (#24332)
Browse files Browse the repository at this point in the history
Backport #24310 by @silverwind

Continuation of #23995

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: bilogic <946010+bilogic@users.noreply.github.com>
  • Loading branch information
3 people committed Apr 25, 2023
1 parent b1094ff commit ef3e3af
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 28 deletions.
2 changes: 1 addition & 1 deletion routers/api/v1/admin/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func EditHook(ctx *context.APIContext) {

// DeleteHook delete a system hook
func DeleteHook(ctx *context.APIContext) {
// swagger:operation DELETE /amdin/hooks/{id} admin adminDeleteHook
// swagger:operation DELETE /admin/hooks/{id} admin adminDeleteHook
// ---
// summary: Delete a hook
// produces:
Expand Down
52 changes: 25 additions & 27 deletions templates/swagger/v1_json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,31 @@
}
}
},
"delete": {
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Delete a hook",
"operationId": "adminDeleteHook",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "id of the hook to delete",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"$ref": "#/responses/empty"
}
}
},
"patch": {
"consumes": [
"application/json"
Expand Down Expand Up @@ -731,33 +756,6 @@
}
}
},
"/amdin/hooks/{id}": {
"delete": {
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Delete a hook",
"operationId": "adminDeleteHook",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "id of the hook to delete",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"$ref": "#/responses/empty"
}
}
}
},
"/markdown": {
"post": {
"consumes": [
Expand Down

0 comments on commit ef3e3af

Please sign in to comment.