Closed emilymdubois closed 6 years ago
Per discussion with @batpad and @samanpwbb, we're going to merge this PR with the following operational endpoints:
# Projects
GET /projects
CREATE /projects
GET /projects/:project
# Items
GET /projects/:project/items
CREATE /projects/:project/items
GET /projects/:project/items/:item
The code in this PR does not look great, but we can iterate on code improvements and tests after we stand-up the new PostGIS schema and confirm it works as expected.
@batpad this PR gets tests working for the following endpoints:
GET /projects
POST /projects
GET /projects/:project
PUT /projects/:project
DELETE /projects/:project
GET /projects/:project/items
POST /projects/:project/items
GET /projects/:project/items/:item
The tests for PUT /projects/:project/items/:item
are still commented out, but that's because I've removed that endpoint for now since it requires some updating. I think this PR is in a good spot to merge into master
, and then we can wrap up the items work in another PR.
@batpad can you review the new schema and model names? Using http://docs.sequelizejs.com/manual/tutorial/associations.html#belongs-to-many-associations for naming conventions to make it easier to map the documentation to our application code.
Once we feel good about the schema, we'll want to do the following before merging & setting up a production stack: