/* global defineEventHandler, createError */ import { database, data } from "~/server/utils/database"; export default defineEventHandler(async (e) => { const [[data]] = await database.query( "SELECT COUNT(*) as `count` FROM `clients`", ) as unknown as data<{count: number}>; if (!data) throw createError("Database returned no rows"); return data; });