make route automatic add the sub routes
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
import Elysia from "elysia";
|
||||
|
||||
export const getAllUser = (ctx: Elysia) => {
|
||||
return "Hello User Module";
|
||||
};
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
import Elysia from "elysia";
|
||||
import { getAllUser } from "./controller/getAllUser.controller";
|
||||
|
||||
export const userModule = new Elysia({ prefix: "/users" })
|
||||
.get("/", () => "Hello User Module")
|
||||
.post("/", () => getAllUser);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Context } from "elysia";
|
||||
|
||||
export const createUserRole = (ctx: Context) => {
|
||||
return "OKOK";
|
||||
return "Hello User Role Module";
|
||||
};
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user