1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Cli,Desktop,Mobile: Resolves #9465: Log user actions (deletions) (#9585)

This commit is contained in:
Henry Heino
2024-03-09 02:33:05 -08:00
committed by GitHub
parent 3222b620b9
commit 75cb639ed2
36 changed files with 182 additions and 59 deletions

View File

@ -4,9 +4,9 @@ import Note from '../../models/Note';
export default async () => {
const result = await BaseItem.allItemsInTrash();
await Note.batchDelete(result.noteIds);
await Note.batchDelete(result.noteIds, { sourceDescription: 'emptyTrash/notes' });
for (const folderId of result.folderIds) {
await Folder.delete(folderId, { deleteChildren: false });
await Folder.delete(folderId, { deleteChildren: false, sourceDescription: 'emptyTrash/folders' });
}
};