Dax Raad преди 7 месеца
родител
ревизия
cfcfceca6d
променени са 1 файла, в които са добавени 6 реда и са изтрити 2 реда
  1. 6 2
      cloud/app/src/routes/debug/index.ts

+ 6 - 2
cloud/app/src/routes/debug/index.ts

@@ -1,9 +1,13 @@
 import type { APIEvent } from "@solidjs/start/server"
 import type { APIEvent } from "@solidjs/start/server"
-import { Resource } from "@opencode/cloud-resource"
 import { json } from "@solidjs/router"
 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) {
 export async function GET(evt: APIEvent) {
   return json({
   return json({
-    data: Resource.Database.host,
+    data: Database.use(async (tx) => {
+      const result = await tx.$count(UserTable)
+      return result
+    }),
   })
   })
 }
 }