Skip to content
Snippets Groups Projects
Commit 7b89f8a8 authored by irfanamal's avatar irfanamal
Browse files

Add middleware

parent 9e024fea
No related merge requests found
......@@ -11,11 +11,11 @@ module.exports = function(app) {
app.get('/api/test/admin', [authJwt.verifyToken, authJwt.isAdmin], testController.adminContent);
app.get('/api/test/member', [authJwt.verifyToken], testController.memberContent);
app.get('/api/user/all', userController.fetchAll);
app.post('/api/user/create', userController.createUser);
app.post('/api/user/edit', userController.editUser);
app.post('/api/user/delete', userController.deleteUser);
app.post('/api/user/detail', userController.viewDetail);
app.get('/api/user/all', [authJwt.verifyToken, authJwt.isAdmin], userController.fetchAll);
app.post('/api/user/create', [authJwt.verifyToken, authJwt.isAdmin], userController.createUser);
app.post('/api/user/edit', [authJwt.verifyToken, authJwt.isAdmin], userController.editUser);
app.post('/api/user/delete', [authJwt.verifyToken, authJwt.isAdmin], userController.deleteUser);
app.post('/api/user/detail', [authJwt.verifyToken, authJwt.isAdmin], userController.viewDetail);
// Sample Hello
var hello = require('../controller/hello')
app.route('/hello').get(hello.index)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment