Add changeUserData to API docs
This commit is contained in:
parent
8c5cfc9e65
commit
46ad28bc1b
30
API.md
30
API.md
|
@ -15,6 +15,7 @@
|
|||
- [/research/getResearch](#researchgetresearch)
|
||||
- [/research/performResearch](#researchperformresearch)
|
||||
- [/build/createBuilding](#buildcreatebuilding)
|
||||
- [/auth/changeUserData](#authchangeuserdata)
|
||||
|
||||
# 1. Description of custom types
|
||||
|
||||
|
@ -240,3 +241,32 @@ updatedAt: Date
|
|||
"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"
|
||||
}
|
||||
```
|
Loading…
Reference in New Issue