osmlab / to-fix-backend

The to-fix server
BSD 3-Clause "New" or "Revised" License
15 stars 13 forks source link

Schema updates #146

Closed emilymdubois closed 6 years ago

emilymdubois commented 7 years ago

@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:

emilymdubois commented 7 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.

emilymdubois commented 6 years ago

@batpad this PR gets tests working for the following endpoints:

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.