|
@@ -185,11 +185,14 @@ export namespace Session {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export async function unshare(id: string) {
|
|
export async function unshare(id: string) {
|
|
|
|
|
+ const share = await getShare(id)
|
|
|
|
|
+ if (!share) return
|
|
|
|
|
+ console.log("share", share)
|
|
|
await Storage.remove("session/share/" + id)
|
|
await Storage.remove("session/share/" + id)
|
|
|
await update(id, (draft) => {
|
|
await update(id, (draft) => {
|
|
|
draft.share = undefined
|
|
draft.share = undefined
|
|
|
})
|
|
})
|
|
|
- await Share.remove(id)
|
|
|
|
|
|
|
+ await Share.remove(id, share.secret)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export async function update(id: string, editor: (session: Info) => void) {
|
|
export async function update(id: string, editor: (session: Info) => void) {
|