mirror of
https://github.com/colanode/colanode.git
synced 2025-12-29 00:25:03 +01:00
Fix delete entry handler
This commit is contained in:
@@ -394,16 +394,16 @@ class EntryService {
|
||||
throw new Error('User not found');
|
||||
}
|
||||
|
||||
const root = await fetchEntry(workspaceDatabase, entryId);
|
||||
if (!root) {
|
||||
throw new Error('Entry not found');
|
||||
}
|
||||
|
||||
const entry = await fetchEntry(workspaceDatabase, entryId);
|
||||
if (!entry) {
|
||||
throw new Error('Entry not found');
|
||||
}
|
||||
|
||||
const root = await fetchEntry(workspaceDatabase, entry.root_id);
|
||||
if (!root) {
|
||||
throw new Error('Root not found');
|
||||
}
|
||||
|
||||
if (
|
||||
!canDeleteEntry({
|
||||
user: {
|
||||
|
||||
Reference in New Issue
Block a user