/**
 * routes.ts
 * Rutas de autenticación.
 * Define los endpoints de register, login y getMe.
 */

import { Router } from "express";
import { AuthController } from "./controller.js";
import { AuthMiddleware } from "../middlewares/auth.middleware.js";

export class AuthRoutes {
  static get routes(): Router {
    const router = Router();
    const controller = new AuthController();

    router.post("/register", controller.register);
    router.post("/login", controller.login);
    router.get("/me", AuthMiddleware.validate, controller.getMe);

    return router;
  }
}