Closed ecumene closed 2 years ago
Try for next time: Make a POST for /projects and projects/{projectID}/walls
Schema is partly implemented. As discussed in issue #40, API works top-down; create a user, get an ID -> use ID to create a related project, get back a project ID -> use projectID when posting walls. EDIT: created user is for show as of now; no cookies or anything yet. no returning user functionality.
For Users:
/post -> /signup (Does not need auth)
/get -> /current_user (Does need auth)
Still need DELETE project and walls.
DELETE walls is done. Just need to DELETE project, then API is complete!
API Schema should be:
HTTP Method Examples:
GET, POST, PUT, UPDATE, DELETE
BROWSER localhost:3000/project = GET /project
fetch (with GET) localhost:3000/project = GET /project
fetch (with POST) localhost:3000/project = POST /project
fetch (with DELETE) localhost:3000/project = DELETE /project
fetch (with PUT) localhost:3000/project = PUT /project
GET /project/{id}
POST /project
{"name": "Summer Project", "ownerID": 1}
POST /project/{projectId}/walls
{"wallLength": 96, "isImperial": true}