just use git clone and npm run start:dev
note: you must have mongodb, no jest or swagger for now.
POST /auth/register
body:
{
"email": "[email protected]",
"password": "1234526789",
"username": "myname"
}
POST /auth/login
body:
{
"email": "[email protected]",
"password": "1234526789"
}
response:
{
"access_token": "JWT_ACCESS_TOKEN"
}
(must use this header when needed: authorization: JWT_ACCESS_TOKEN)
3. GET /auth/profile
(need authorization)
all tasks endpoints need an authorization:
POST /tasks
create a task for a user
body:
{
"title": "",
"description": "",
"status": 0
}
Pending = 0
SUCCESS = 1
CANCELED = 2
IN_PROGRESS = 3
GET /tasks
, list tasks
Query:
"?page=2&include_deleted=true"
GET /tasks/:id
get task idPUT /tasks/:id
edit tasks status:
// one or more is required
{
"title": "",
"description": "",
"status": 2,
"isDeleted": true
}
Delete /tasks/:id
delete a task, short forPUT /tasks/:id
with isDeleted: true.