feat(tui): unshare command
This commit is contained in:
parent
3d9a5d9970
commit
8825cd3811
4 changed files with 28 additions and 4 deletions
|
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue