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

21 lines
514 B
JavaScript
Raw Permalink Normal View History

2020-06-27 00:35:13 +00:00
const express = require("express");
2020-01-10 01:44:58 +00:00
const router = express.Router();
2020-06-27 00:35:13 +00:00
const app = require("../server");
const authController = require("../controllers/auth");
const {
signupValidationRules,
loginValidationRules,
validate,
} = require("../middleware/userValidator");
2020-01-10 01:44:58 +00:00
2020-06-27 00:35:13 +00:00
router.post(
"/signup",
signupValidationRules(),
validate,
authController.signup
);
router.post("/login", loginValidationRules(), validate, authController.login);
router.post("/guest", authController.guest);
2020-01-10 01:44:58 +00:00
module.exports = router;