mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-09 19:04:53 +01:00
14 lines
424 B
TypeScript
14 lines
424 B
TypeScript
import type { APIEvent } from "@solidjs/start/server"
|
|
import { json } from "@solidjs/router"
|
|
import { Database } from "@opencode-ai/console-core/drizzle/index.js"
|
|
import { UserTable } from "@opencode-ai/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
|
|
}),
|
|
})
|
|
}
|