Deploy link API : https://whispering-plains-72637.herokuapp.com
Deploy link Client : http://fancytodo.ilhammarzlik.com
Error Response
{
code: 400,
msg: ['Validation Error']
}
{
code: 403,
msg: 'User not authorized'
}
{
code: 404,
msg: 'Data not found'
}
{
code: 500,
msg: 'Internal server error'
}
Login user with registered email and password
none
example :
{
email: test@mail.com,
password: password123
}
200 : {
result: {
id: <user_id>,
email: <user-email>
}
token: <jwt_token>
}
Register with email and password
none
example :
{
email: test@mail.com,
password: password123
}
200 : {
result: {
id: <user_id>,
email: <user-email>
}
token: <jwt_token>
}
Login user with google account
none
example :
{
idToken: <TOKEN_FROM_GOOGLE>
}
200 : {
result: {
id: <user_id>,
email: <user-email>
}
token: <jwt_token>
}
{
token: <JWT_TOKEN>
}
none
example:
[
{
"id": 70,
"title": "test todo punya akun google",
"description": "hello",
"status": "ongoing",
"due_date": "2020-02-06T00:00:00.000Z",
"UserId": 15,
"ProjectId": null,
"createdAt": "2020-02-06T16:24:41.908Z",
"updatedAt": "2020-02-06T16:24:41.908Z"
}
]
{
token: <JWT_TOKEN>
}
[
{
"title": "test todo punya akun google",
"description": "hello",
"due_date": "2020-02-06"
}
]
example:
[
{
"id": 70,
"title": "test todo punya akun google",
"description": "hello",
"status": "ongoing",
"due_date": "2020-02-06T00:00:00.000Z",
"UserId": 15,
"ProjectId": null,
"createdAt": "2020-02-06T16:24:41.908Z",
"updatedAt": "2020-02-06T16:24:41.908Z"
}
]
{
token: <JWT_TOKEN>
}
[
{
"title": "test todo punya akun google",
"description": "hello",
"due_date": "2020-02-06"
}
]
example:
[
result : 1,
data : {
"id": 70,
"title": "test todo punya akun google",
"description": "hello",
"status": "ongoing",
"due_date": "2020-02-06T00:00:00.000Z",
"UserId": 15,
"ProjectId": null,
"createdAt": "2020-02-06T16:24:41.908Z",
"updatedAt": "2020-02-06T16:24:41.908Z"
}
]
{
token: <JWT_TOKEN>
}
none
example:
[
result : 1,
data : {
"id": 70,
"title": "test todo punya akun google",
"description": "hello",
"status": "done",
"due_date": "2020-02-06T00:00:00.000Z",
"UserId": 15,
"ProjectId": null,
"createdAt": "2020-02-06T16:24:41.908Z",
"updatedAt": "2020-02-06T16:24:41.908Z"
}
]
{
token: <JWT_TOKEN>
}
none
example:
[
rmessage : "todo deleted",
data : {
"id": 70,
"title": "test todo punya akun google",
"description": "hello",
"status": "ongoing",
"due_date": "2020-02-06T00:00:00.000Z",
"UserId": 15,
"ProjectId": null,
"createdAt": "2020-02-06T16:24:41.908Z",
"updatedAt": "2020-02-06T16:24:41.908Z"
}
]
{
token: <JWT_TOKEN>
}
none
example:
[
{
"ProjectId": 19,
"UserId": 15,
"status": "join",
"createdAt": "2020-02-06T16:04:59.135Z",
"updatedAt": "2020-02-06T16:04:59.135Z",
"Project": {
"id": 19,
"name": "Phase 3",
"owner": 15,
"createdAt": "2020-02-06T16:04:59.094Z",
"updatedAt": "2020-02-06T16:04:59.094Z"
}
}
]
Get detailed projects
{
token: <JWT_TOKEN>
}
none
example:
{
"data": {
"id": 19,
"name": "Phase 3",
"owner": 15,
"members": [
"drillenthusiast@gmail.com",
"ilham@gmail.com"
]
},
"todos": [
{
"id": 87,
"title": "sdasd",
"description": "aaaaa",
"status": "ongoing",
"due_date": "2020-02-10T00:00:00.000Z",
"UserId": 1,
"ProjectId": 19,
"createdAt": "2020-02-07T11:36:25.059Z",
"updatedAt": "2020-02-07T11:36:25.059Z"
},
{
"id": 69,
"title": "Berhasil sign in google",
"description": "Hello semua",
"status": "ongoing",
"due_date": "2020-02-07T00:00:00.000Z",
"UserId": 1,
"ProjectId": 19,
"createdAt": "2020-02-06T16:05:51.964Z",
"updatedAt": "2020-02-06T16:05:51.964Z"
}
]
}
{
token: <JWT_TOKEN>
}
{
name: <project-name>
}
example:
{
"projectData": {
"id": 22,
"name": "Test Project",
"owner": 2,
"updatedAt": "2020-02-08T10:43:05.043Z",
"createdAt": "2020-02-08T10:43:05.043Z"
},
"final": {
"UserId": 2,
"ProjectId": 22,
"status": "join",
"updatedAt": "2020-02-08T10:43:05.110Z",
"createdAt": "2020-02-08T10:43:05.110Z",
"id": 47
}
}
Get all user invitation
{
token: <JWT_TOKEN>
}
{
name: <project-name>
}
example:
[
{
"ProjectId": 19,
"UserId": 15,
"status": "pending",
"createdAt": "2020-02-06T16:04:59.135Z",
"updatedAt": "2020-02-06T16:04:59.135Z",
"Project": {
"id": 19,
"name": "Phase 3",
"owner": 15,
"createdAt": "2020-02-06T16:04:59.094Z",
"updatedAt": "2020-02-06T16:04:59.094Z"
}
}
]
Delete single project
{
token: <JWT_TOKEN>
}
{
name: <project-name>
}
example:
{
msg: "Project deleted"
}
$ npm install
$ npm run dev