Future Computing
This is going to be a website logging my research on DNA computing and other types of computing like Quantum
Requirements
- PostgreSQL
- NodeJS > v6
API
Routes:
Default
GET
- Returns status (200) and JSON of API saying welcome
/users/
GET
- Returns status (200) and JSON of all users and thier role(s)
- Returns status (412) and a JSON message if not successful.
POST
- Creates a new user and generates a hashed & salted password
- Assigns a default role
- Returns status (200) & JSON of the new user
- Returns status (412) and a JSON message if not successful.
Params:
Name | Type | Default | Required |
---|---|---|---|
firstname | string | null | yes |
lastname | string | null | yes |
string | null | yes | |
password | string | null | yes |
/users/:id
Params:
Same for all routes
Name | Type | Default | Required |
---|---|---|---|
id | int | null | yes |
GET
- Returns status (200) and JSON of all a user and thier role(s)
- Returns status (412) and a JSON message if not successful.
DELETE
- Removes User From Database
- Returns a status code of (204) if successful or (412) if not successfull.
PUT
Needs Implementation
/roles/
GET
- Returns status (200) and JSON of all roles
- Returns status (412) and a JSON message if not successful.
POST
- Creates a new role
- Returns status (200) and JSON of the new role
- Returns status (412) and a JSON message if not successful.
Params:
Name | Type | Default | Required |
---|---|---|---|
role | string | null | yes |
/roles/:id
Params:
Same for all routes
Name | Type | Default | Required |
---|---|---|---|
id | int | null | yes |
GET
- Returns JSON of the found role if successful
- Returns status (412) if not successful.
PUT
Needs Implementation
DELETE
- Removes Role From Database
- Returns a status code of (204) if successful or (412) if not successful.