make route automatic add the sub routes

This commit is contained in:
rafiarrafif
2025-05-06 15:07:21 +07:00
parent b554ff0e5b
commit a5153f0786
6 changed files with 46 additions and 6 deletions

View File

@ -1,5 +1,5 @@
import { Context } from "elysia";
export const createUserRole = (ctx: Context) => {
return "OKOK";
return "Hello User Role Module";
};

View File

@ -1,6 +1,6 @@
import Elysia from "elysia";
import { createUserRole } from "./controller/createUserRole.controller";
export const userRoleModule = new Elysia({ prefix: "/user-role" })
export const userRoleModule = new Elysia({ prefix: "/roles" })
.get("/", () => "Hello User Role Module")
.post("/create", createUserRole);
.post("/", createUserRole);