Skip to content

Commit

Permalink
refactor: remove unused middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Oct 16, 2020
1 parent b2ff159 commit 688d7a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/routes/write/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ module.exports = function () {
const middlewares = [middleware.authenticate];

setupApiRoute(router, '/', middleware, [...middlewares, middleware.checkRequired.bind(null, ['name'])], 'post', controllers.write.groups.create);
setupApiRoute(router, '/:slug', middleware, [...middlewares, middleware.assert.group, middleware.exposePrivileges], 'delete', controllers.write.groups.delete);
setupApiRoute(router, '/:slug/membership/:uid', middleware, [...middlewares, middleware.assert.group, middleware.exposePrivileges], 'put', controllers.write.groups.join);
setupApiRoute(router, '/:slug/membership/:uid', middleware, [...middlewares, middleware.assert.group, middleware.exposePrivileges], 'delete', controllers.write.groups.leave);
setupApiRoute(router, '/:slug', middleware, [...middlewares, middleware.assert.group], 'delete', controllers.write.groups.delete);
setupApiRoute(router, '/:slug/membership/:uid', middleware, [...middlewares, middleware.assert.group], 'put', controllers.write.groups.join);
setupApiRoute(router, '/:slug/membership/:uid', middleware, [...middlewares, middleware.assert.group], 'delete', controllers.write.groups.leave);

return router;
};

0 comments on commit 688d7a2

Please sign in to comment.