import express from "express";
import { registerTeacher, registerStudent, registerStudentForAdmin, registerTeacherForAdmin, registerAdmin, validateEmail, loginUser, refreshToken, logoutUser, forgotPassword, resetPassword } from "../../controllers/auth/auth.js";
import { verifyLoginUser, adminOnly } from "../../middlewares/User/authUser.js";

const router = express.Router();

router.post("/register/teacher", registerTeacher);

router.post("/register/student", registerStudent);

router.post("/admin/register/teacher", verifyLoginUser, adminOnly, registerTeacherForAdmin);

router.post("/admin/register/student", verifyLoginUser, adminOnly, registerStudentForAdmin);

router.post("/register/admin", verifyLoginUser, adminOnly, registerAdmin);

router.post("/validateEmail", validateEmail);

router.post("/login", loginUser);

router.post("/refreshToken", refreshToken);

router.post("/logout", logoutUser);

router.post("/forgotPassword", forgotPassword)

router.post("/resetPassword", resetPassword)

export default router;