rcos / observatory-server

A project tracking dashboard for Rensselaer Center for Open Source
https://rcos.io
MIT License
14 stars 51 forks source link

Room API Authorization #813

Open aeksco opened 5 years ago

aeksco commented 5 years ago

See snippet below for details:

// TODO - change `:location` to `:id`
router.get('/:location', controller.show); //gets single room based on location

// TODO - needs auth.hasRole('admin')
router.post('/id', controller.create); //creates a room if user is a mentor

// TODO - needs auth.hasRole('admin')
router.put('/id', controller.update); // updates room info if user is a mentor

// TODO - needs auth.hasRole('admin')
router.delete('/id', controller.destroy); // delete a room from db if user is a mentor
aeksco commented 5 years ago

Make changes in observatory-server/server/api/room/index.js