refactor: clarify variables and their names

This commit is contained in:
siiky 2024-07-18 13:00:13 +01:00
parent 736b822bd9
commit e0f7357204

View file

@ -715,11 +715,11 @@ function updatePhotoCard (id, patch) {
function updatePhotos (imagesData, id, dir) {
return Promise.resolve(imagesData)
.then(patch => {
if (_.isEmpty(imagesData)) {
return patch
}
.then(imagesData => {
const newPatch = {}
if (_.isEmpty(imagesData)) {
return newPatch
}
// i.e. ../<lamassu-server-home>/<operatorid>/<customerid>/idcarddata
const dirname = path.join(dir)
// create the directory tree if needed