Skip to content

Latest commit

 

History

History
146 lines (80 loc) · 2.34 KB

users.md

File metadata and controls

146 lines (80 loc) · 2.34 KB
label order
Users
100000

Users

All the routes about the users

Routes

==- [!badge text="POST" variant="success"] Login

All parameters need to be in a form-data.

Parameters


Body

Name Type Description Required
name string The account username true
password string The account password true

Responses


Status Description
200: OK Logged in
401: Unauthorized Wrong username or password

==- [!badge text="POST" variant="success"] Logout

Responses


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.

Parameters


Body

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

Responses


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.

Parameters


Body

Name Type Description Required
name string The account username false
password string The account password false
profilePicture File The profile picture image false

Responses


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

Responses


Status Description
200: OK Account data
400: Bad Request You are not logged in

===