diff --git a/apps/web/src/app/api/c.ts b/apps/web/src/app/api/c.ts new file mode 100644 index 00000000..2ad4cca2 --- /dev/null +++ b/apps/web/src/app/api/c.ts @@ -0,0 +1,15 @@ +// TODO: Remove this file + +import type { APIEvent } from "@solidjs/start/server"; +import { accounts, db } from "~/db"; + +export const GET = async ({ request, nativeEvent }: APIEvent) => { + try { + const users = await db.select().from(accounts); + + return new Response(`ok ${users.length}`); + } catch (err) { + console.error(err); + return new Response("error", { status: 500 }); + } +};