rest-api
REST API built with Express and Sequelize
List of user routes:
Route | HTTP | Header(s) | Body | Description |
---|---|---|---|---|
/api/register |
POST | none |
username:string (Required),password:string (Required) |
Log a user in |
/api/login |
POST | none |
username:string (Required),password:string (Required) |
Create a user |
/api/users |
GET | none |
none |
Get all the users |
/api/users/:id |
GET | none |
none |
Get a single user |
/api/users/:id |
DELETE | none |
none |
Delete a user |
/api/users/:id |
PUT | none |
username:string (Required),password:string (Required) |
Update a user with new info |
List of todo routes:
Route | HTTP | Header(s) | Body | Description |
---|---|---|---|---|
/api/todos |
GET | none |
none |
Get all the todos |
/api/todos/:id |
GET | none |
none |
Get a single todo |
/api/todos |
POST | none |
todoname:string (Required),password:string (Required) |
Create a todo |
/api/todos/:id |
DELETE | none |
none |
Delete a todo |
/api/todos/:id |
PUT | none |
todoname:string (Required),password:string (Required) |
Update a user with new info |