Ajouter la fonction getPathList pour récupérer les chemins à partir d'une liste d'IDs
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user