Ajouter la fonction getPathList pour récupérer les chemins à partir d'une liste d'IDs

This commit is contained in:
2025-02-12 09:09:11 +01:00
parent 158a288dec
commit 6ee50ee7b4

View File

@@ -91,6 +91,15 @@ async function getPathFromIds(projectId, orderId) {
return res.rows[0].path; return res.rows[0].path;
} }
async function getPathList(IdList) {
const pathList = [];
for (const id of IdList) {
const path = await getPathFromIds(id);
pathList.push(path);
}
return pathList;
}
export { export {
uploadMeasureImage, uploadMeasureImage,
addMeasureToProject, addMeasureToProject,
@@ -102,5 +111,6 @@ export {
getMeasureImage, getMeasureImage,
getMeasurementById, getMeasurementById,
updateMeasurementById, updateMeasurementById,
getPathFromIds getPathFromIds,
getPathList
} }