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