diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2022-03-26 10:04:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-26 10:04:22 +0100 |
commit | 59b867dc2dfc1ecb0ee703ff44e1be9c5c53cf86 (patch) | |
tree | 7114b991554e6e7dcb4123c0aa365c674d8411a0 /templates/swagger | |
parent | Set OpenGraph title to DisplayName in profile pages (#19206) (diff) | |
download | forgejo-59b867dc2dfc1ecb0ee703ff44e1be9c5c53cf86.tar.xz forgejo-59b867dc2dfc1ecb0ee703ff44e1be9c5c53cf86.zip |
Add `ContextUser` to http request context (#18798)
This PR adds a middleware which sets a ContextUser (like GetUserByParams before) in a single place which can be used by other methods. For routes which represent a repo or org the respective middlewares set the field too.
Also fix a bug in modules/context/org.go during refactoring.
Diffstat (limited to 'templates/swagger')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 4f2e7dbb1a..1aec9ec06f 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -12087,39 +12087,6 @@ } } }, - "/users/{follower}/following/{followee}": { - "get": { - "tags": [ - "user" - ], - "summary": "Check if one user is following another user", - "operationId": "userCheckFollowing", - "parameters": [ - { - "type": "string", - "description": "username of following user", - "name": "follower", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "username of followed user", - "name": "followee", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, "/users/{username}": { "get": { "produces": [ @@ -12225,6 +12192,39 @@ } } }, + "/users/{username}/following/{target}": { + "get": { + "tags": [ + "user" + ], + "summary": "Check if one user is following another user", + "operationId": "userCheckFollowing", + "parameters": [ + { + "type": "string", + "description": "username of following user", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of followed user", + "name": "target", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, "/users/{username}/gpg_keys": { "get": { "produces": [ |