Update some crud endpoints

This commit is contained in:
rui hildt 2020-03-23 17:55:47 +01:00
parent ab1c54461f
commit d0a8c17089
1 changed files with 5 additions and 5 deletions

View File

@ -14,8 +14,8 @@ ___
| latest_time | string | |
| created_at | datetime | generated by database |
#### Add an account
**`POST /api/account`**
#### Register an account
**`POST /api/account/register`**
##### Request
A json object for the user to register with **`username`**, **`email`**, **`password`**, `timezone`, `earliest_time` and `latest_time`.
@ -46,7 +46,7 @@ A json object for the registered user with `id`, `username`, `email`, `timezone`
```
#### Update an account
**`PUT /api/account/:id`**
**`PUT /api/account/:id/profile`**
##### Request
A json object for the user to register with `id` and any of `username`, `email`, `password`, `timezone`, `earliest_time`, `latest_time`.
@ -96,7 +96,7 @@ A json object for the deleted user with `username` and `email`.
```
#### Log in an account
**`POST /api/account`**
**`POST /api/account/login`**
##### Request
A json object for the user to login with either **`email`** or **`username`**, and **`password`** .
@ -109,7 +109,7 @@ A json object for the user to login with either **`email`** or **`username`**, a
```
##### Response
A json object with the logged in user with `username` and `email`.
A json object for the registered user with `id`, `username`, `email`, `timezone`, `earliest_time` and `latest_time`.
```
{