]> source.dussan.org Git - gitea.git/commitdiff
Fix typo in API route (#24310) (#24332)
authorGiteabot <teabot@gitea.io>
Tue, 25 Apr 2023 14:57:33 +0000 (10:57 -0400)
committerGitHub <noreply@github.com>
Tue, 25 Apr 2023 14:57:33 +0000 (10:57 -0400)
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>
routers/api/v1/admin/hooks.go
templates/swagger/v1_json.tmpl

index 2aed4139f3cb696a0f16488acd306b187fb0ea49..d5603dd0684b6046ccc631ea8988a63f14b6c58e 100644 (file)
@@ -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:
index c9bba3ae51d5d53038354cb1a291296094aafe00..50a969cd170e33ec9c198700d2ba1377f81bb82a 100644 (file)
           }
         }
       },
+      "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"
         }
       }
     },
-    "/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": [