fix: stored images path to use environment variables

This commit is contained in:
Sérgio Salgado 2022-10-13 22:44:35 +01:00
parent df5bc81700
commit b275e41899

View file

@ -262,7 +262,7 @@ function deleteEditedData (id, data) {
*/
async function updateEditedPhoto (id, photo, photoType) {
const newPatch = {}
const baseDir = photoType === 'frontCamera' ? frontCameraBaseDir : idPhotoCardBasedir
const baseDir = photoType === 'frontCamera' ? FRONT_CAMERA_DIR : ID_PHOTO_CARD_DIR
const { createReadStream, filename } = photo
const stream = createReadStream()