feat(tui): unshare command

This commit is contained in:
adamdottv 2025-07-03 07:09:09 -05:00
commit 8825cd3811
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
4 changed files with 28 additions and 4 deletions

View file

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