Route | HTTP | Header(s) | Request(s) | Response(s) | Description |
---|---|---|---|---|---|
/register |
POST | none |
Body name: String email: String password: String |
Success201 CreatedFail 500 Internal server error |
Create a new user |
/users |
GET | none |
none |
Success200 OKFail 500 Internal server error |
Get all the users |
/users/:id |
GET | none |
Headers _id: String |
Success200 OKFail 500 Internal server error |
Get one user |
/users/:id |
PUT | none |
Headers _id: String body name: String email: String password: String |
Success200 OKFail 401 Unauthorized500 Internal server error |
Update a user |
/users/:id |
DELETE | none |
Headers id: String |
Success204 No contentFail 401 Unauthorized500 Internal server error |
Delete a user |
Route | HTTP | Header(s) | Request(s) | Response(s) | Description |
---|---|---|---|---|---|
/articles |
GET | none |
none |
Success200 OKFail 500 Internal server error |
Get all the articles |
/articles/:id |
GET | none |
Headers _id: String |
Success200 OKFail 500 Internal server error |
Get one article |
/articles/:id |
PUT | none |
Headers _id: String body title: String content: String author: String featuredImg: String |
Success200 OKFail 401 Unauthorized500 Internal server error |
Update an article |
/articles/:id |
DELETE | none |
Headers id: String |
Success204 No contentFail 401 Unauthorized500 Internal server error |
Delete an article |