Skip to content
Snippets Groups Projects
Commit 24455c6a authored by irfanamal's avatar irfanamal
Browse files

Update router

parent 81b7b8dd
No related merge requests found
......@@ -4,11 +4,18 @@ const authJwt = require('./verifyJwtToken');
module.exports = function(app) {
const authController = require('../controller/authController.js');
const testController = require('../controller/testController.js');
const userController = require('../controller/userController.js');
app.post('/api/auth/signup', [verifySignUp.checkDuplicateUserNameOrEmail, verifySignUp.checkRolesExisted], authController.signup);
app.post('/api/auth/login', authController.signin);
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);
// 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