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;
}
async function getPathList(IdList) {
const pathList = [];
for (const id of IdList) {
const path = await getPathFromIds(id);
pathList.push(path);
}
return pathList;
}
export {
uploadMeasureImage,
addMeasureToProject,
@@ -102,5 +111,6 @@ export {
getMeasureImage,
getMeasurementById,
updateMeasurementById,
getPathFromIds
getPathFromIds,
getPathList
}