From 768cc5e16a68bc60754ef46774d44fcecbcbdb37 Mon Sep 17 00:00:00 2001 From: Will Bradley Date: Sun, 25 Oct 2020 00:17:52 -0700 Subject: [PATCH] adjust_event_route_and_permissions --- routes/events.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/routes/events.js b/routes/events.js index 233de35..f300f35 100644 --- a/routes/events.js +++ b/routes/events.js @@ -60,7 +60,7 @@ module.exports = [ config: { auth: { strategies: ['auth', 'jwt'], - scope: ['USER'], + scope: ['ADMIN'], }, handler: req => model.remove(req.params.event_id), description: 'Deletes an Event', @@ -83,7 +83,7 @@ module.exports = [ config: { auth: { strategies: ['auth', 'jwt'], - scope: ['USER'], + scope: ['ADMIN'], }, description: 'Add An Event', notes: 'Adds an Event', @@ -94,13 +94,13 @@ module.exports = [ }, }, { - method: 'PATCH', + method: 'PUT', path: '/events/{event_id}', handler: req => model.edit(req.params.event_id, req.payload), config: { auth: { strategies: ['auth', 'jwt'], - scope: ['USER'], + scope: ['ADMIN'], }, description: 'Edit An Event', notes: 'Edit an Event',