Files
coolify/src/routes/register/index.ts
2022-02-24 09:32:34 +01:00

12 lines
325 B
TypeScript

import * as db from '$lib/database';
import { ErrorHandler } from '$lib/database';
import type { RequestHandler } from '@sveltejs/kit';
export const get: RequestHandler = async () => {
try {
return { status: 200, body: { userCount: await db.prisma.user.count() } };
} catch (error) {
return ErrorHandler(error);
}
};