POST /users
Pass a json object like this:
{
"email": "[email protected]",
"password": "123"
}
You get JSON Web Token that you pass to all requests via the header x-auth
.
{
"text": "Do something",
"completed": false, // default
}
You get an ID that you use to edit the todo or delete it.
{
"text": "Do something",
"completed": false
}
{
"text": "Edited text",
"completed": true
}
{ // the deleted todo
"text": "Edited text",
"completed": true
}
{
todos: [{
"text": "TODO 1",
"completed": true
},
{
"text": "TODO 2",
"completed": false
}, ...]
}