mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-02-02 06:42:29 +00:00
Added endpoints required for the user profile page
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
5bf64c735f
commit
37b774223f
1 changed files with 46 additions and 0 deletions
|
@ -89,6 +89,21 @@ paths:
|
||||||
'401':
|
'401':
|
||||||
description: the user is not logged in
|
description: the user is not logged in
|
||||||
content: {}
|
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:
|
/me/export:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
@ -97,6 +112,21 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: The zip-archive with all notes
|
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:
|
/status:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
@ -547,6 +577,22 @@ components:
|
||||||
photo:
|
photo:
|
||||||
type: string
|
type: string
|
||||||
format: uri
|
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:
|
Config:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
Loading…
Reference in a new issue