label | order |
---|---|
Users |
100000 |
All the routes about the users
==- [!badge text="POST" variant="success"] Login
All parameters need to be in a form-data.
Name | Type | Description | Required |
---|---|---|---|
name | string | The account username | true |
password | string | The account password | true |
Status | Description |
---|---|
200: OK | Logged in |
401: Unauthorized | Wrong username or password |
==- [!badge text="POST" variant="success"] Logout
Status | Description |
---|---|
200: OK | Logged out |
400: Bad Request | You are not logged in |
==- [!badge text="POST" variant="success"] Create Account
All parameters need to be in a form-data.
Name | Type | Description | Required |
---|---|---|---|
name | string | The account username | true |
password | string | The account password | true |
type | string | The account type (Admin, Adult, Teen, Kid) | true |
profilePicture | File | The profile picture image | false |
Status | Description |
---|---|
200: OK | Account created |
400: Bad Request | Username already exists |
==- [!badge text="POST" variant="success"] Edit Account
All parameters need to be in a form-data.
Name | Type | Description | Required |
---|---|---|---|
name | string | The account username | false |
password | string | The account password | false |
profilePicture | File | The profile picture image | false |
Status | Description |
---|---|
200: OK | Account edited |
400: Bad Request | You are not logged in |
==- [!badge text="GET"] Who am I ?
You need to be logged in.
The route return in a JSON the account data, the name, the sha256 password, the profile picture, and the account type
Status | Description |
---|---|
200: OK | Account data |
400: Bad Request | You are not logged in |
===