mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-05 07:52:03 +00:00
wip: share
This commit is contained in:
parent
89b72e4442
commit
075ef0fa34
2 changed files with 7 additions and 2 deletions
|
|
@ -137,7 +137,11 @@ export default new Hono<{ Bindings: Env }>()
|
|||
return c.json({})
|
||||
})
|
||||
.post("/share_delete_admin", async (c) => {
|
||||
const id = c.env.SYNC_SERVER.idFromName("oVF8Rsiv")
|
||||
const body = await c.req.json<{ sessionShortName: string; adminSecret: string }>()
|
||||
const sessionShortName = body.sessionShortName
|
||||
const adminSecret = body.adminSecret
|
||||
if (adminSecret !== Resource.ADMIN_SECRET.value) throw new Error("Invalid admin secret")
|
||||
const id = c.env.SYNC_SERVER.idFromName(sessionShortName)
|
||||
const stub = c.env.SYNC_SERVER.get(id)
|
||||
await stub.clear()
|
||||
return c.json({})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue