Add changeUserData to API docs

This commit is contained in:
Aelita4 2024-06-18 22:09:49 +02:00
parent 8c5cfc9e65
commit 46ad28bc1b
Signed by: Aelita4
GPG Key ID: E44490C2025906C1
1 changed files with 30 additions and 0 deletions

30
API.md
View File

@ -15,6 +15,7 @@
- [/research/getResearch](#researchgetresearch) - [/research/getResearch](#researchgetresearch)
- [/research/performResearch](#researchperformresearch) - [/research/performResearch](#researchperformresearch)
- [/build/createBuilding](#buildcreatebuilding) - [/build/createBuilding](#buildcreatebuilding)
- [/auth/changeUserData](#authchangeuserdata)
# 1. Description of custom types # 1. Description of custom types
@ -240,3 +241,32 @@ updatedAt: Date
"message": "OK" "message": "OK"
} }
``` ```
## /auth/changeUserData
**URL: PATCH** /auth/changeUserData/*:type*
**DESCRIPTION:** Used to change user username, email or password. Type A access token required via Authorization header in addition to current password in body
Type can be one of (anything other will throw ***400 Bad Request***):
- username
- email
- password
**BODY:**
```json
{
"password": "string",
"newUsername": "string",
"newEmail": "string",
"newPassword": "string"
}
```
**OUTPUT:**
```json
{
"code": 200,
"message": "OK"
}
```