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

10 lines
208 B
TypeScript
Raw Normal View History

import { defineEventHandler } from "h3";
2023-05-11 06:03:22 +02:00
import { database } from "~/server/utils/database";
2023-05-11 06:03:22 +02:00
export default defineEventHandler(async (e) => {
return {
count: await database.client.count({}),
};
2023-05-11 06:03:22 +02:00
});