Skip to content

Commit 62c964d

Browse files
committed
Fix lint
1 parent 0e5199a commit 62c964d

File tree

2 files changed

+28
-32
lines changed

2 files changed

+28
-32
lines changed

routers/api/v1/admin/hooks.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func ListHooks(ctx *context.APIContext) {
5555

5656
// GetHook get an organization's hook by id
5757
func GetHook(ctx *context.APIContext) {
58-
// swagger:operation GET /hooks/{id} admin adminGetHook
58+
// swagger:operation GET /admin/hooks/{id} admin adminGetHook
5959
// ---
6060
// summary: Get a hook
6161
// produces:
@@ -87,7 +87,7 @@ func GetHook(ctx *context.APIContext) {
8787

8888
// CreateHook create a hook for an organization
8989
func CreateHook(ctx *context.APIContext) {
90-
// swagger:operation POST /admin/hooks/ admin adminCreateHook
90+
// swagger:operation POST /admin/hooks admin adminCreateHook
9191
// ---
9292
// summary: Create a hook
9393
// consumes:

templates/swagger/v1_json.tmpl

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,7 @@
167167
"$ref": "#/responses/HookList"
168168
}
169169
}
170-
}
171-
},
172-
"/admin/hooks/": {
170+
},
173171
"post": {
174172
"consumes": [
175173
"application/json"
@@ -200,6 +198,31 @@
200198
}
201199
},
202200
"/admin/hooks/{id}": {
201+
"get": {
202+
"produces": [
203+
"application/json"
204+
],
205+
"tags": [
206+
"admin"
207+
],
208+
"summary": "Get a hook",
209+
"operationId": "adminGetHook",
210+
"parameters": [
211+
{
212+
"type": "integer",
213+
"format": "int64",
214+
"description": "id of the hook to get",
215+
"name": "id",
216+
"in": "path",
217+
"required": true
218+
}
219+
],
220+
"responses": {
221+
"200": {
222+
"$ref": "#/responses/Hook"
223+
}
224+
}
225+
},
203226
"patch": {
204227
"consumes": [
205228
"application/json"
@@ -726,33 +749,6 @@
726749
}
727750
}
728751
},
729-
"/hooks/{id}": {
730-
"get": {
731-
"produces": [
732-
"application/json"
733-
],
734-
"tags": [
735-
"admin"
736-
],
737-
"summary": "Get a hook",
738-
"operationId": "adminGetHook",
739-
"parameters": [
740-
{
741-
"type": "integer",
742-
"format": "int64",
743-
"description": "id of the hook to get",
744-
"name": "id",
745-
"in": "path",
746-
"required": true
747-
}
748-
],
749-
"responses": {
750-
"200": {
751-
"$ref": "#/responses/Hook"
752-
}
753-
}
754-
}
755-
},
756752
"/markdown": {
757753
"post": {
758754
"consumes": [

0 commit comments

Comments
 (0)