Fix delete entry handler

This commit is contained in:
Hakan Shehu
2025-01-03 20:07:35 +01:00
parent 19de9bf56c
commit 42d3cdca24

View File

@@ -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: {