diff --git a/server/api/orders/count.get.ts b/server/api/orders/count.get.ts new file mode 100644 index 0000000..632280d --- /dev/null +++ b/server/api/orders/count.get.ts @@ -0,0 +1,9 @@ +import { defineEventHandler } from "h3"; + +import { database } from "~/server/utils/database"; + +export default defineEventHandler(async (e) => { + return { + count: await database.order.count({}), + }; +});