Added endpoints required for the user profile page

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2020-05-29 17:27:52 +02:00 committed by David Mehren
parent 5bf64c735f
commit 37b774223f
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -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: