import { Router } from "express";
import { requireAuth } from "../../middleware/auth";
import { authController } from "./auth.controller";

const router = Router();

// Registration is disabled (kept for parity with previous route)
router.post("/register", (req, res) => authController.register(req, res));

// Login
router.post("/login", (req, res) => authController.login(req, res));

// Current user
router.get("/me", requireAuth, (req, res) => authController.me(req as any, res));

// Password reset: request
router.post("/password/forgot", (req, res) => authController.forgotPassword(req, res));

// Password reset: consume
router.post("/password/reset", (req, res) => authController.resetPassword(req, res));

export default router;
