Oversights

This commit is contained in:
Bobby Wibowo 2019-08-04 06:42:35 +07:00
parent 6496b03b71
commit e6bb94692b
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF
2 changed files with 4 additions and 4 deletions

View File

@ -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 = []

View File

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