You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
566 B
JavaScript
23 lines
566 B
JavaScript
12 months ago
|
// Dependencies and Modules
|
||
|
|
||
|
const express = require('express');
|
||
|
const userController = require('../controllers/user');
|
||
|
// Routing Component
|
||
|
const router = express.Router();
|
||
|
// Auth import
|
||
|
const auth = require('../auth')
|
||
|
// Auth
|
||
|
const {verify,verifyAdmin} = auth;
|
||
|
// verifyng
|
||
|
|
||
|
router.post("/register", (req, res) => {
|
||
|
userController.registerUser(req.body).then(resultFromController => res.send(resultFromController));
|
||
|
});
|
||
|
|
||
|
|
||
|
router.post('/login',userController.loginUser);
|
||
|
|
||
|
|
||
|
router.get('/userdetail',verify,userController.retrieveDetails);
|
||
|
|
||
|
module.exports = router;
|