CirclesUBI / circles-api-legacy

User and organization profile service
GNU Affero General Public License v3.0
4 stars 0 forks source link

User api work #25

Closed edzillion closed 5 years ago

edzillion commented 5 years ago

I refactored the routes so they are much simpler now:

router.get('/:id', usersController.findOne);
router.post('/:id', usersController.addOne);
router.delete('/:id', usersController.deleteOne);

and got rid of updateOne()

I have the models returning related rows when you findOne() and deleting / unrelating when rows when you deleteOne()

Updated the auth middleware to use the aws-sdk

Added seeds and migrations for current schema. Settings in the top of the file determine the amount of records seeded:

const requiredOrganizations = 2
const notificationsPerUser = 3

I have moved the env stuff out of the repo and nuked that file (which will break previous versions :( )