create auth middleware

This commit is contained in:
rafiarrafif
2025-05-15 17:19:35 +07:00
parent b8033f4e3d
commit be493b08ef
4 changed files with 35 additions and 1 deletions

View File

@ -1,6 +1,9 @@
import Elysia from "elysia";
import { createUserRole } from "./controller/createUserRole.controller";
import { unautenticatedMiddleware } from "../../middleware/auth/unauthenticated.middleware";
export const userRoleModule = new Elysia({ prefix: "/roles" })
.get("/", () => "Hello User Role Module")
.get("/", () => "Hello User Role Module", {
beforeHandle: unautenticatedMiddleware,
})
.post("/", createUserRole);