Tags
POST api/tags
This route allows users to tag their tasks to fit their needs and even further organize their tasks
Expected Headers:
"Content-Type": "application/json"
"Authorization": "Bearer <token>"
Expected Body:
{
"name": "<string>",
"user": "<user id>"
}
Expected Response:
{
"__v": 0,
"name": "High",
"user": "58ea7c938091afefeb5e4080",
"_id": "58f6fedf9c37e70f42df9059"
}
GET api/tags
This route returns all tags created on a user's account
Expected Headers:
"Authorization": "Bearer <token>"
Expected Response:
[
{
"_id": "58f6fedf9c37e70f42df9059",
"name": "High",
"user": "58ea7c938091afefeb5e4080",
"__v": 0
}
]
PUT api/tags/:id
This route allows the user to update the name of an existing tag
Expected Headers:
"Content-Type": "application/json"
"Authorization": "Bearer <token>"
Expected Body:
{
"name": "<string>"
}
Expected Response:
{
"_id": "58f6fedf9c37e70f42df9059",
"name": "Low",
"user": "58ea7c938091afefeb5e4080",
"__v": 0
}
DELETE api/tags/:id
This route allows a user to delete existing tags from their profile. Upon success no body will be returned.
Expected Headers:
"Authorization": "Bearer <token>"