node-go/packages/server/routes/auth.js
2020-06-26 17:35:13 -07:00

20 lines
514 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);
router.post("/guest", authController.guest);
module.exports = router;