diff options
Diffstat (limited to 'packages/console/app/src/routes/debug/index.ts')
| -rw-r--r-- | packages/console/app/src/routes/debug/index.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/console/app/src/routes/debug/index.ts b/packages/console/app/src/routes/debug/index.ts new file mode 100644 index 000000000..39fa33d90 --- /dev/null +++ b/packages/console/app/src/routes/debug/index.ts @@ -0,0 +1,13 @@ +import type { APIEvent } from "@solidjs/start/server" +import { json } from "@solidjs/router" +import { Database } from "@opencode/console-core/drizzle/index.js" +import { UserTable } from "@opencode/console-core/schema/user.sql.js" + +export async function GET(evt: APIEvent) { + return json({ + data: await Database.use(async (tx) => { + const result = await tx.$count(UserTable) + return result + }), + }) +} |
