From 6ee50ee7b40e89cd0eb222661c09c903a1fab087 Mon Sep 17 00:00:00 2001 From: Kerboul Date: Wed, 12 Feb 2025 09:09:11 +0100 Subject: [PATCH] =?UTF-8?q?Ajouter=20la=20fonction=20getPathList=20pour=20?= =?UTF-8?q?r=C3=A9cup=C3=A9rer=20les=20chemins=20=C3=A0=20partir=20d'une?= =?UTF-8?q?=20liste=20d'IDs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/measure/measureManager.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/measure/measureManager.js b/src/measure/measureManager.js index c01382b..3d4234a 100644 --- a/src/measure/measureManager.js +++ b/src/measure/measureManager.js @@ -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 }