2024-04-29 21:56:25 +02:00
|
|
|
import { Router } from "express";
|
|
|
|
import * as authController from "../controllers/authController";
|
2024-05-01 23:24:03 +02:00
|
|
|
import validate from '../middlewares/validateRequest'
|
|
|
|
import * as AuthVal from '../validators/authValidator'
|
2024-04-29 21:56:25 +02:00
|
|
|
//import handleValidation from "../middlewares/handleValidation";
|
|
|
|
//import { requireAuth } from "../middlewares/authMiddleware";
|
|
|
|
|
|
|
|
const router = Router();
|
|
|
|
|
|
|
|
//const mws = [requireAuth, handleValidation.handleValidationError];
|
|
|
|
|
2024-05-01 23:24:03 +02:00
|
|
|
router.post("/auth/signup",validate(AuthVal.signup) , authController.signup_post);
|
2024-04-29 21:56:25 +02:00
|
|
|
|
|
|
|
//router.post(
|
|
|
|
// "/login",
|
|
|
|
// authValidator.checkUserLogin(),
|
|
|
|
// handleValidation.handleValidationError,
|
|
|
|
// userController.login_post
|
|
|
|
//);
|
|
|
|
|
|
|
|
//router.post(
|
|
|
|
// "/register",
|
|
|
|
// authValidator.checkUserRegister(),
|
|
|
|
// handleValidation.handleValidationError,
|
|
|
|
// userController.register_post
|
|
|
|
//);
|
|
|
|
|
|
|
|
//router.post("/logout", userController.logout_post);
|
|
|
|
|
|
|
|
//router.post(
|
|
|
|
// "/edit",
|
|
|
|
// [requireAuth],
|
|
|
|
// authValidator.checkChange(),
|
|
|
|
// userController.edit_post
|
|
|
|
//);
|
|
|
|
|
|
|
|
export default router;
|