Skip to content

Commit

Permalink
Fix for GIFT-249 by Ryan
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewNatoli committed Nov 9, 2017
1 parent 8039ee5 commit 05ffea7
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions server/apps/nominations/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ const router: Router<UserRequest<>> = new Router();
// Households
router.get('/households').use(auth.ensureLoggedIn).handleAsync(Household.list);
router.get('/households/:id', (proxy: {id: string})).use(auth.ensureLoggedIn).handleAsync(Household.getHousehold);
router.put('/households/:id', (proxy: {id: string})).use(auth.ensureAdmin).use(validators).handleAsync(Household.updateHousehold);
router.post('/households').use(auth.ensureAdmin).use(validators).handleAsync(Household.createHousehold);
router.post('/households/submit').use(auth.ensureAdmin).handleAsync(Household.submitNomination);
router.post('/households/:id/upload').use(auth.ensureAdmin).handleAsync(Household.createAttachments);
router.post('/households/:id/feedback').use(auth.ensureAdmin).handleAsync(Household.submitFeedback);
router.post('/households/:id/attachments').use(auth.ensureAdmin).handleAsync(Household.createAttachments);
router.get('/households/:id/attachments').use(auth.ensureAdmin).handleAsync(Household.getAttachments);
router.put('/households/:id', (proxy: {id: string})).use(auth.ensureLoggedIn).use(validators).handleAsync(Household.updateHousehold);
router.post('/households').use(auth.ensureLoggedIn).use(validators).handleAsync(Household.createHousehold);
router.post('/households/submit').use(auth.ensureLoggedIn).handleAsync(Household.submitNomination);
router.post('/households/:id/upload').use(auth.ensureLoggedIn).handleAsync(Household.createAttachments);
router.post('/households/:id/feedback').use(auth.ensureLoggedIn).handleAsync(Household.submitFeedback);
router.post('/households/:id/attachments').use(auth.ensureLoggedIn).handleAsync(Household.createAttachments);
router.get('/households/:id/attachments').use(auth.ensureLoggedIn).handleAsync(Household.getAttachments);
router.destroy('/households/:id', (proxy: {id: string})).use(auth.ensureAdmin).handleAsync(Household.removeHousehold);

// Users
router.get('/me').use(auth.ensureLoggedIn).handleAsync(Me.getMe);
Expand Down

0 comments on commit 05ffea7

Please sign in to comment.