node-go/packages/play-node-go/server/routes/auth.js

11 lines
452 B
JavaScript
Raw Normal View History

2020-01-10 01:44:58 +00:00
const express = require('express');
const router = express.Router();
const app = require('../server');
2020-01-10 01:44:58 +00:00
const authController = require('../controllers/auth');
const { signupValidationRules, loginValidationRules, validate } = require('../middleware/userValidator');
2020-01-10 01:44:58 +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;