WorkshopTasker/server/api/orders/count.get.ts

10 lines
207 B
TypeScript
Raw Normal View History

import { defineEventHandler } from "h3";
import { database } from "~/server/utils/database";
export default defineEventHandler(async (e) => {
return {
count: await database.order.count({}),
};
});