mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
fixed eslint error & integrated with prettier as well as formatted the whole codebase (#3450)
This commit is contained in:
@@ -4,7 +4,7 @@ const sander = require('sander')
|
||||
const attachmentManagement = require('./attachmentManagement')
|
||||
const { findStorage } = require('browser/lib/findStorage')
|
||||
|
||||
function deleteNote (storageKey, noteKey) {
|
||||
function deleteNote(storageKey, noteKey) {
|
||||
let targetStorage
|
||||
try {
|
||||
targetStorage = findStorage(storageKey)
|
||||
@@ -13,7 +13,7 @@ function deleteNote (storageKey, noteKey) {
|
||||
}
|
||||
|
||||
return resolveStorageData(targetStorage)
|
||||
.then(function deleteNoteFile (storage) {
|
||||
.then(function deleteNoteFile(storage) {
|
||||
const notePath = path.join(storage.path, 'notes', noteKey + '.cson')
|
||||
|
||||
try {
|
||||
@@ -26,8 +26,11 @@ function deleteNote (storageKey, noteKey) {
|
||||
storageKey
|
||||
}
|
||||
})
|
||||
.then(function deleteAttachments (storageInfo) {
|
||||
attachmentManagement.deleteAttachmentFolder(storageInfo.storageKey, storageInfo.noteKey)
|
||||
.then(function deleteAttachments(storageInfo) {
|
||||
attachmentManagement.deleteAttachmentFolder(
|
||||
storageInfo.storageKey,
|
||||
storageInfo.noteKey
|
||||
)
|
||||
return storageInfo
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user