fix: await album zip jetpack.rename()

This commit is contained in:
Bobby 2022-10-04 05:16:15 +07:00
parent afd81c965d
commit d5b1ad69d9
No known key found for this signature in database
GPG Key ID: 941839794CBF5A09

View File

@ -439,7 +439,7 @@ self.edit = async (req, res) => {
// Rename album ZIP if it exists
const zipFullPath = path.join(paths.zips, `${album.identifier}.zip`)
if (await jetpack.existsAsync(zipFullPath) === 'file') {
await jetpack.rename(zipFullPath, `${update.identifier}.zip`)
await jetpack.renameAsync(zipFullPath, `${update.identifier}.zip`)
}
return res.json({