mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
node locking
This commit is contained in:
parent
8f0625f734
commit
0828143a54
1 changed files with 2 additions and 3 deletions
|
@ -247,10 +247,9 @@ function* onLockSaga({ id, is_locked }: ReturnType<typeof nodeLock>) {
|
||||||
deleted_at: is_locked ? new Date().toISOString() : null,
|
deleted_at: is_locked ? new Date().toISOString() : null,
|
||||||
});
|
});
|
||||||
|
|
||||||
const { data, error } = yield call(reqWrapper, postNodeLock, { id, is_locked });
|
const { error } = yield call(reqWrapper, postNodeLock, { id, is_locked });
|
||||||
|
|
||||||
if (error || !data.deleted_at)
|
if (error) return yield call(updateNodeEverywhere, { ...current, deleted_at });
|
||||||
return yield call(updateNodeEverywhere, { ...current, deleted_at }); // ok and matches
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function* nodeSaga() {
|
export default function* nodeSaga() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue