fix(stats): bypass worker runtime crash
This commit is contained in:
parent
c6f719e153
commit
f96e6aa6ed
3 changed files with 128 additions and 70 deletions
|
|
@ -1,19 +1,3 @@
|
|||
import { AppConfig } from "@opencode-ai/stats-core/config"
|
||||
import { Effect } from "effect"
|
||||
import { runStatsEffect } from "../../stats-runtime"
|
||||
|
||||
export async function GET() {
|
||||
return Response.json(
|
||||
await runStatsEffect(
|
||||
Effect.gen(function* () {
|
||||
const config = yield* AppConfig
|
||||
return {
|
||||
ok: true,
|
||||
app: "stats",
|
||||
stage: config.stage,
|
||||
publicUrl: config.publicUrl,
|
||||
}
|
||||
}),
|
||||
),
|
||||
)
|
||||
return Response.json({ ok: true, app: "stats" })
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue