mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-07-08 01:31:00 +08:00
Add delete token by token id
This commit is contained in:
61
api.yml
61
api.yml
@@ -3316,6 +3316,67 @@ paths:
|
||||
$ref: "#/components/schemas/ApiResponseError"
|
||||
example:
|
||||
{ "ok": false, "status": 2, "error": "Failed to decode password with base64." }
|
||||
/token/manage:
|
||||
delete:
|
||||
operationId: deleteTokenById
|
||||
summary: Delete a token by token id
|
||||
requestBody:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
type: object
|
||||
required: [id]
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Token id
|
||||
default: ''
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ApiResponseTrue"
|
||||
"400":
|
||||
description: Bad Request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ApiResponseError"
|
||||
example: { "ok": false, "status": 2, "error": "token id not specified." }
|
||||
"401":
|
||||
description: Authorization information is missing or invalid
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ApiResponseError"
|
||||
example: { "ok": false, "status": 401, "error": "Unauthorized" }
|
||||
"403":
|
||||
description: Permission denied
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ApiResponseError"
|
||||
examples:
|
||||
admin:
|
||||
description: Requires administrator privileges.
|
||||
value: { "ok": false, "status": 403, "error": "Permission denied." }
|
||||
root:
|
||||
description: Requires root user.
|
||||
value: { "ok": false, "status": 3, "error": "Only root user can delete admin user's token." }
|
||||
"404":
|
||||
description: Not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ApiResponseError"
|
||||
examples:
|
||||
user:
|
||||
value: { "ok": false, "status": 404, "error": "User not found." }
|
||||
token:
|
||||
value: { "ok": false, "status": 404, "error": "Token not found." }
|
||||
/user:
|
||||
delete:
|
||||
operationId: deleteUser
|
||||
|
||||
Reference in New Issue
Block a user