node-go/packages/server/routes/auth.js
2020-02-05 16:54:09 -08:00

10 lines
452 B
JavaScript

const express = require('express');
const router = express.Router();
const app = require('../server');
const authController = require('../controllers/auth');
const { signupValidationRules, loginValidationRules, validate } = require('../middleware/userValidator');
router.post('/signup', signupValidationRules(), validate, authController.signup);
router.post('/login', loginValidationRules(), validate, authController.login);
module.exports = router;