diff --git a/pkg/swagger/docs.go b/pkg/swagger/docs.go index 1c60debc1..30f535e15 100644 --- a/pkg/swagger/docs.go +++ b/pkg/swagger/docs.go @@ -5917,53 +5917,6 @@ const docTemplate = `{ } } }, - "/teams/{id}/members/{userID}": { - "delete": { - "security": [ - { - "JWTKeyAuth": [] - } - ], - "description": "Remove a user from a team. This will also revoke any access this user might have via that team. A user can remove themselves from the team if they are not the last user in the team.", - "produces": [ - "application/json" - ], - "tags": [ - "team" - ], - "summary": "Remove a user from a team", - "parameters": [ - { - "type": "integer", - "description": "Team ID", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "User ID", - "name": "userID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "The user was successfully removed from the team.", - "schema": { - "$ref": "#/definitions/models.Message" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "#/definitions/models.Message" - } - } - } - } - }, "/teams/{id}/members/{userID}/admin": { "post": { "security": [ @@ -6011,6 +5964,53 @@ const docTemplate = `{ } } }, + "/teams/{id}/members/{username}": { + "delete": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Remove a user from a team. This will also revoke any access this user might have via that team. A user can remove themselves from the team if they are not the last user in the team.", + "produces": [ + "application/json" + ], + "tags": [ + "team" + ], + "summary": "Remove a user from a team", + "parameters": [ + { + "type": "integer", + "description": "The ID of the team you want to remove th user from", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "The username of the user you want to remove", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "The user was successfully removed from the team.", + "schema": { + "$ref": "#/definitions/models.Message" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/test/{table}": { "patch": { "description": "Fills the specified table with the content provided in the payload. You need to enable the testing endpoint before doing this and provide the ` + "`" + `Authorization: \u003ctoken\u003e` + "`" + ` secret when making requests to this endpoint. See docs for more details.", diff --git a/pkg/swagger/swagger.json b/pkg/swagger/swagger.json index d782aa809..ec70f284e 100644 --- a/pkg/swagger/swagger.json +++ b/pkg/swagger/swagger.json @@ -5909,53 +5909,6 @@ } } }, - "/teams/{id}/members/{userID}": { - "delete": { - "security": [ - { - "JWTKeyAuth": [] - } - ], - "description": "Remove a user from a team. This will also revoke any access this user might have via that team. A user can remove themselves from the team if they are not the last user in the team.", - "produces": [ - "application/json" - ], - "tags": [ - "team" - ], - "summary": "Remove a user from a team", - "parameters": [ - { - "type": "integer", - "description": "Team ID", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "User ID", - "name": "userID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "The user was successfully removed from the team.", - "schema": { - "$ref": "#/definitions/models.Message" - } - }, - "500": { - "description": "Internal error", - "schema": { - "$ref": "#/definitions/models.Message" - } - } - } - } - }, "/teams/{id}/members/{userID}/admin": { "post": { "security": [ @@ -6003,6 +5956,53 @@ } } }, + "/teams/{id}/members/{username}": { + "delete": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Remove a user from a team. This will also revoke any access this user might have via that team. A user can remove themselves from the team if they are not the last user in the team.", + "produces": [ + "application/json" + ], + "tags": [ + "team" + ], + "summary": "Remove a user from a team", + "parameters": [ + { + "type": "integer", + "description": "The ID of the team you want to remove th user from", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "The username of the user you want to remove", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "The user was successfully removed from the team.", + "schema": { + "$ref": "#/definitions/models.Message" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/test/{table}": { "patch": { "description": "Fills the specified table with the content provided in the payload. You need to enable the testing endpoint before doing this and provide the `Authorization: \u003ctoken\u003e` secret when making requests to this endpoint. See docs for more details.", diff --git a/pkg/swagger/swagger.yaml b/pkg/swagger/swagger.yaml index f63f916e2..57ca47c10 100644 --- a/pkg/swagger/swagger.yaml +++ b/pkg/swagger/swagger.yaml @@ -5724,38 +5724,6 @@ paths: summary: Add a user to a team tags: - team - /teams/{id}/members/{userID}: - delete: - description: Remove a user from a team. This will also revoke any access this - user might have via that team. A user can remove themselves from the team - if they are not the last user in the team. - parameters: - - description: Team ID - in: path - name: id - required: true - type: integer - - description: User ID - in: path - name: userID - required: true - type: integer - produces: - - application/json - responses: - "200": - description: The user was successfully removed from the team. - schema: - $ref: '#/definitions/models.Message' - "500": - description: Internal error - schema: - $ref: '#/definitions/models.Message' - security: - - JWTKeyAuth: [] - summary: Remove a user from a team - tags: - - team /teams/{id}/members/{userID}/admin: post: description: If a user is team admin, this will make them member and vise-versa. @@ -5786,6 +5754,38 @@ paths: summary: Toggle a team member's admin status tags: - team + /teams/{id}/members/{username}: + delete: + description: Remove a user from a team. This will also revoke any access this + user might have via that team. A user can remove themselves from the team + if they are not the last user in the team. + parameters: + - description: The ID of the team you want to remove th user from + in: path + name: id + required: true + type: integer + - description: The username of the user you want to remove + in: path + name: username + required: true + type: integer + produces: + - application/json + responses: + "200": + description: The user was successfully removed from the team. + schema: + $ref: '#/definitions/models.Message' + "500": + description: Internal error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Remove a user from a team + tags: + - team /test/{table}: patch: consumes: