mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-15 00:46:22 +00:00
Oversights
This commit is contained in:
parent
6496b03b71
commit
e6bb94692b
@ -489,14 +489,14 @@ uploadsController.cleanUpChunks = async (uuidDir, chunkNames) => {
|
|||||||
))
|
))
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
fs.rmdir(uuidDir, error => {
|
fs.rmdir(uuidDir, error => {
|
||||||
if (error) reject(error)
|
if (error) return reject(error)
|
||||||
resolve(true)
|
resolve(true)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadsController.formatInfoMap = (req, res, user, infoMap) => {
|
uploadsController.formatInfoMap = (req, res, user, infoMap) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise(resolve => {
|
||||||
let iteration = 0
|
let iteration = 0
|
||||||
const files = []
|
const files = []
|
||||||
const existingFiles = []
|
const existingFiles = []
|
||||||
|
@ -336,7 +336,7 @@ utilsController.bulkDeleteFiles = async (field, values, user, set) => {
|
|||||||
deletedFiles.forEach(file => {
|
deletedFiles.forEach(file => {
|
||||||
const identifier = file.name.split('.')[0]
|
const identifier = file.name.split('.')[0]
|
||||||
set.delete(identifier)
|
set.delete(identifier)
|
||||||
// console.log(`Removed ${identifier} from identifiers cache (bulkDeleteFiles)`)
|
// console.log(`Removed ${identifier} from identifiers cache (bulkDeleteFiles)`)
|
||||||
})
|
})
|
||||||
|
|
||||||
// Update albums if necessary
|
// Update albums if necessary
|
||||||
@ -362,7 +362,7 @@ utilsController.bulkDeleteFiles = async (field, values, user, set) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
return resolve()
|
return resolve()
|
||||||
})
|
}).catch(console.error)
|
||||||
}))
|
}))
|
||||||
return failed
|
return failed
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user