mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-26 19:53:59 -05:00
Added endpoints required for the user profile page
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
60dc77b9d2
commit
b2b5a1ba51
1 changed files with 46 additions and 0 deletions
|
@ -89,6 +89,21 @@ paths:
|
|||
'401':
|
||||
description: the user is not logged in
|
||||
content: {}
|
||||
delete:
|
||||
tags:
|
||||
- user
|
||||
summary: "Deletes the currently logged-in user from the system and removes all it's notes"
|
||||
operationId: deleteMe
|
||||
parameters:
|
||||
- in: header
|
||||
name: X-Token
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: Token to ensure that no accidental account deletions will be performed
|
||||
responses:
|
||||
'200':
|
||||
description: The user was deleted successfully
|
||||
/me/export:
|
||||
get:
|
||||
tags:
|
||||
|
@ -97,6 +112,21 @@ paths:
|
|||
responses:
|
||||
'200':
|
||||
description: The zip-archive with all notes
|
||||
/me/password:
|
||||
post:
|
||||
tags:
|
||||
- user
|
||||
summary: Sets the new password of a user
|
||||
requestBody:
|
||||
required: true
|
||||
description: The new password of the user
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
"$ref": "#/components/schemas/UserPasswordChange"
|
||||
responses:
|
||||
'200':
|
||||
description: The password was changed
|
||||
/status:
|
||||
get:
|
||||
tags:
|
||||
|
@ -547,6 +577,22 @@ components:
|
|||
photo:
|
||||
type: string
|
||||
format: uri
|
||||
provider:
|
||||
type: string
|
||||
enum: ['facebook', 'github', 'twitter', 'gitlab', 'dropbox', 'google', 'saml', 'oauth2', 'email', 'ldap', 'openid']
|
||||
UserPasswordChange:
|
||||
type: object
|
||||
properties:
|
||||
password:
|
||||
type: string
|
||||
token:
|
||||
type: string
|
||||
description: Token to avoid unwanted password change requests
|
||||
UserDeleteToken:
|
||||
type: object
|
||||
properties:
|
||||
token:
|
||||
type: string
|
||||
Config:
|
||||
type: object
|
||||
properties:
|
||||
|
|
Loading…
Reference in a new issue