mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Deleting a note should also delete the attachments -> fixes #1900
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const resolveStorageData = require('./resolveStorageData')
|
||||
const path = require('path')
|
||||
const sander = require('sander')
|
||||
const attachmentManagement = require('./attachmentManagement')
|
||||
const { findStorage } = require('browser/lib/findStorage')
|
||||
|
||||
function deleteNote (storageKey, noteKey) {
|
||||
@@ -25,6 +26,10 @@ function deleteNote (storageKey, noteKey) {
|
||||
storageKey
|
||||
}
|
||||
})
|
||||
.then(function deleteAttachments (storageInfo) {
|
||||
attachmentManagement.deleteAttachmentFolder(storageInfo.storageKey, storageInfo.noteKey)
|
||||
return storageInfo
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = deleteNote
|
||||
|
||||
Reference in New Issue
Block a user