mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-02 23:23:45 +00:00
14 lines
408 B
TypeScript
14 lines
408 B
TypeScript
import type { APIEvent } from "@solidjs/start/server"
|
|
import { json } from "@solidjs/router"
|
|
import { Database } from "@opencode/cloud-core/drizzle/index.js"
|
|
import { UserTable } from "@opencode/cloud-core/schema/user.sql.js"
|
|
|
|
export async function GET(evt: APIEvent) {
|
|
return json({
|
|
data: Database.use(async (tx) => {
|
|
const result = await tx.$count(UserTable)
|
|
return result
|
|
}),
|
|
})
|
|
}
|