Skip to content
Permalink
Browse files

Oversights

  • Loading branch information...
BobbyWibowo committed Aug 3, 2019
1 parent 6496b03 commit e6bb94692b0e06907c71137d9cf1f67aa25ec15b
Showing with 4 additions and 4 deletions.
  1. +2 −2 controllers/uploadController.js
  2. +2 −2 controllers/utilsController.js
@@ -489,14 +489,14 @@ uploadsController.cleanUpChunks = async (uuidDir, chunkNames) => {
))
return new Promise((resolve, reject) => {
fs.rmdir(uuidDir, error => {
if (error) reject(error)
if (error) return reject(error)
resolve(true)
})
})
}

uploadsController.formatInfoMap = (req, res, user, infoMap) => {
return new Promise((resolve, reject) => {
return new Promise(resolve => {
let iteration = 0
const files = []
const existingFiles = []
@@ -336,7 +336,7 @@ utilsController.bulkDeleteFiles = async (field, values, user, set) => {
deletedFiles.forEach(file => {
const identifier = file.name.split('.')[0]
set.delete(identifier)
// console.log(`Removed ${identifier} from identifiers cache (bulkDeleteFiles)`)
// console.log(`Removed ${identifier} from identifiers cache (bulkDeleteFiles)`)
})

// Update albums if necessary
@@ -362,7 +362,7 @@ utilsController.bulkDeleteFiles = async (field, values, user, set) => {
})

return resolve()
})
}).catch(console.error)
}))
return failed
}

0 comments on commit e6bb946

Please sign in to comment.
You can’t perform that action at this time.