summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-04-24 20:44:27 +0200
committerGitHub <noreply@github.com>2023-04-24 20:44:27 +0200
commitfe007b65bd78980f4740aa60845be90e2a08c778 (patch)
treea89807dea506f8e122d3e0d60501c274bb612506
parent20a3b03fe57bebca3c30bf5a39cad62ad1ae4ed9 (diff)
downloadgitea-fe007b65bd78980f4740aa60845be90e2a08c778.tar.gz
gitea-fe007b65bd78980f4740aa60845be90e2a08c778.zip
Fix typo in API route (#24310)
Continuation of https://github.com/go-gitea/gitea/pull/23995 --------- Co-authored-by: bilogic <946010+bilogic@users.noreply.github.com>
-rw-r--r--routers/api/v1/admin/hooks.go2
-rw-r--r--templates/swagger/v1_json.tmpl52
2 files changed, 26 insertions, 28 deletions
diff --git a/routers/api/v1/admin/hooks.go b/routers/api/v1/admin/hooks.go
index 8264503c9d..6a08aa5125 100644
--- a/routers/api/v1/admin/hooks.go
+++ b/routers/api/v1/admin/hooks.go
@@ -142,7 +142,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 aa447ca050..e3f87d703e 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -297,6 +297,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"
@@ -858,33 +883,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": [