import type { Express, Request, Response } from "express";
import me from "./me.js";
import register from "./register.js";
import userRoles from "./userroles.js";
import resetPassword from "./resetPassword.js";
import { requireAuth } from "../../../pkg/middleware/authMiddleware.js";

export const setupAuthRoutes = (app: Express, basePath: string) => {
    app.use(basePath + "/api/user/me", requireAuth(), me);
    app.use(basePath + "/api/user/resetpassword", resetPassword);
    app.use(basePath + "/api/user/register", register);
    app.use(basePath + "/api/user/roles", requireAuth(), userRoles);
};
