admin unshare

This commit is contained in:
Frank
2026-01-12 14:20:31 -05:00
parent 62702fbd11
commit b7b09fdfc2
2 changed files with 17 additions and 1 deletions

View File

@@ -9,7 +9,8 @@
"dev": "vite dev",
"build": "vite build",
"build:cloudflare": "OPENCODE_DEPLOYMENT_TARGET=cloudflare vite build",
"start": "vite start"
"start": "vite start",
"shell-prod": "sst shell --target Teams --stage production"
},
"dependencies": {
"@opencode-ai/util": "workspace:*",

View File

@@ -0,0 +1,15 @@
import { Storage } from "../src/core/storage"
// read share id from args
const args = process.argv.slice(2)
if (args.length !== 1) {
console.error("Usage: bun script/scrap.ts <shareID>")
process.exit(1)
}
const shareID = args[0]
await Storage.remove(["share", shareID])
const list = await Storage.list({ prefix: ["share_data", shareID] })
for (const item of list) {
await Storage.remove(item)
}