For every submission to the codebase, check that it meets the DoD below.
[x] Code fulfils the user story and scenarios set out in the github task and UI prototype.
[x] The feature has been thoroughly manually tested. (Ask other devs to give some fresh eyes on this as you go.)
[x] All tests run and passed from terminal. Any broken tests fixed, not disabled or skipped.
npm test
[x] Tests added or updated where appropriate. (Be pragmatic about adding new tests, think; how critical is this module or function? If this function broke due to changes, how would it affect the user experience?)
[x] eslint run and passes. Any issues fixed.
npm run lint
[x] PR created in Github.
[ ] Two peer reviews from other devs.
[ ] One peer review from one of the teachers.
[ ] After all the peer review comments are addressed, the branch is merged to main!
Created two database tables called 'garden_shop' and 'shop_products' and seeded them . Created db function to join the two tables and return the products for a certain garden given the id. Also created route at '/api/v1/shop/:id'.
Made tests for both the db function and routes, just run 'npx jest shop' to see them.
Definition of Done
For every submission to the codebase, check that it meets the DoD below.
https://github.com/pohutukawa-2022/gardenz/issues/37
Created two database tables called 'garden_shop' and 'shop_products' and seeded them . Created db function to join the two tables and return the products for a certain garden given the id. Also created route at '/api/v1/shop/:id'. Made tests for both the db function and routes, just run 'npx jest shop' to see them.