This commit is contained in:
Your Name committed 2026-06-13 22:02:04 -04:00
1 parent 20f43bd58d
commit 1ac727f4e5
10 files changed
+306 -122

No files matched your search

+2
View File
@@ -1,5 +1,6 @@
import { Elysia, t } from "elysia";
import prisma from "../lib/prisma";
import { adminOnly } from "../middleware/auth";
export const menusRoute = new Elysia({ prefix: "/menus" })
.get("/", async () => {
@@ -26,6 +27,7 @@ export const menusRoute = new Elysia({ prefix: "/menus" })
}
return menu;
})
.use(adminOnly)
.post("/", async ({ body, set }) => {
try {
const { name, items } = body as { name: string; items?: { label: string; url: string; order: number }[] };