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;
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user