1
0
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:
Nguyen Viet Hung
2020-02-05 13:28:27 +13:00
committed by GitHub
parent 051ce9e208
commit 592aca1539
186 changed files with 9233 additions and 5565 deletions

View File

@@ -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
})
}