feat(tui): unshare command

This commit is contained in:
adamdottv
2025-07-03 07:09:09 -05:00
parent 3d9a5d9970
commit 8825cd3811
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())
}
}