repair: replace path_foto to sparepart_foto
This commit is contained in:
@@ -33,7 +33,7 @@ class SparepartController {
|
|||||||
const typeDoc = ext === ".pdf" ? "PDF" : "IMAGE";
|
const typeDoc = ext === ".pdf" ? "PDF" : "IMAGE";
|
||||||
const folder = typeDoc === "PDF" ? "pdf" : "images";
|
const folder = typeDoc === "PDF" ? "pdf" : "images";
|
||||||
const pathDocument = `${folder}/${file.filename}`;
|
const pathDocument = `${folder}/${file.filename}`;
|
||||||
value.path_foto = pathDocument;
|
value.sparepart_foto = pathDocument;
|
||||||
}
|
}
|
||||||
value.created_by = req.user?.user_id || null;
|
value.created_by = req.user?.user_id || null;
|
||||||
const results = await SparepartService.createSparepart(value);
|
const results = await SparepartService.createSparepart(value);
|
||||||
@@ -58,7 +58,7 @@ class SparepartController {
|
|||||||
const typeDoc = ext === ".pdf" ? "PDF" : "IMAGE";
|
const typeDoc = ext === ".pdf" ? "PDF" : "IMAGE";
|
||||||
const folder = typeDoc === "PDF" ? "pdf" : "images";
|
const folder = typeDoc === "PDF" ? "pdf" : "images";
|
||||||
const pathDocument = `${folder}/${file.filename}`;
|
const pathDocument = `${folder}/${file.filename}`;
|
||||||
value.path_foto = pathDocument;
|
value.sparepart_foto = pathDocument;
|
||||||
}
|
}
|
||||||
value.updated_by = req.user?.user_id || null;
|
value.updated_by = req.user?.user_id || null;
|
||||||
const results = await SparepartService.updateSparepart(id, value);
|
const results = await SparepartService.updateSparepart(id, value);
|
||||||
|
|||||||
BIN
uploads/images/img-e102e31c-2025-11-25_09-19-36.jpg
Normal file
BIN
uploads/images/img-e102e31c-2025-11-25_09-19-36.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 113 KiB |
BIN
uploads/images/img-e37c76ce-2025-11-25_09-20-26.jpg
Normal file
BIN
uploads/images/img-e37c76ce-2025-11-25_09-20-26.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 113 KiB |
Reference in New Issue
Block a user