fix /unshare

This commit is contained in:
Dax Raad
2025-07-03 15:33:55 -04:00
parent fce59db94a
commit ed4f862b49
2 changed files with 6 additions and 6 deletions

View File

@@ -66,13 +66,10 @@ export namespace Share {
.then((x) => x as { url: string; secret: string })
}
export async function remove(id: string) {
const share = await Session.getShare(id).catch(() => {})
if (!share) return
const { secret } = share
export async function remove(sessionID: string, secret: string) {
return fetch(`${URL}/share_delete`, {
method: "POST",
body: JSON.stringify({ id, secret }),
body: JSON.stringify({ sessionID, secret }),
}).then((x) => x.json())
}
}