2020-01-10 01:44:58 +00:00
|
|
|
const express = require('express');
|
|
|
|
const router = express.Router();
|
2020-01-15 21:52:01 +00:00
|
|
|
const app = require('../server');
|
2020-01-10 01:44:58 +00:00
|
|
|
const authController = require('../controllers/auth');
|
2020-01-15 21:52:01 +00:00
|
|
|
const { signupValidationRules, loginValidationRules, validate } = require('../middleware/userValidator');
|
2020-01-10 01:44:58 +00:00
|
|
|
|
2020-01-15 21:52:01 +00:00
|
|
|
router.post('/signup', signupValidationRules(), validate, authController.signup);
|
|
|
|
router.post('/login', loginValidationRules(), validate, authController.login);
|
2020-01-10 01:44:58 +00:00
|
|
|
|
|
|
|
module.exports = router;
|