diff options
author | Giteabot <teabot@gitea.io> | 2023-04-25 10:57:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-25 10:57:33 -0400 |
commit | ef3e3afc05a1ac4caca8a1c9478d2320c7341b0e (patch) | |
tree | 256dd8f3e72b21f108d9ae971f8489a8fe72640a | |
parent | b1094ff28c3412b27d572dff6f19997c8f155f87 (diff) | |
download | gitea-ef3e3afc05a1ac4caca8a1c9478d2320c7341b0e.tar.gz gitea-ef3e3afc05a1ac4caca8a1c9478d2320c7341b0e.zip |
Fix typo in API route (#24310) (#24332)
Backport #24310 by @silverwind
Continuation of https://github.com/go-gitea/gitea/pull/23995
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: bilogic <946010+bilogic@users.noreply.github.com>
-rw-r--r-- | routers/api/v1/admin/hooks.go | 2 | ||||
-rw-r--r-- | templates/swagger/v1_json.tmpl | 52 |
2 files changed, 26 insertions, 28 deletions
diff --git a/routers/api/v1/admin/hooks.go b/routers/api/v1/admin/hooks.go index 2aed4139f3..d5603dd068 100644 --- a/routers/api/v1/admin/hooks.go +++ b/routers/api/v1/admin/hooks.go @@ -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: diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index c9bba3ae51..50a969cd17 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -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" @@ -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": [ |