import { Router } from "express";
import { asyncHandler } from "../../middleware/errorHandler.js";
import * as controller from "./controller.js";

export const authRouter = Router();

authRouter.post("/register", asyncHandler(controller.register));
authRouter.post("/login", asyncHandler(controller.login));
authRouter.post("/refresh", asyncHandler(controller.refresh));
authRouter.post("/logout", asyncHandler(controller.logout));
