From 468e551ed792c9652865d063fb6896d09d9f1759 Mon Sep 17 00:00:00 2001 From: Sanjaiyan Parthipan Date: Mon, 17 Jun 2024 00:50:26 +0530 Subject: [PATCH] perf: Improve by running in concurrent --- src/GitLab.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GitLab.js b/src/GitLab.js index bfd6f5c..219dffb 100644 --- a/src/GitLab.js +++ b/src/GitLab.js @@ -283,9 +283,9 @@ export default class GitLab { async deleteFolder(path) { const filePaths = await this.listFiles(path, true, false); - for (let file of filePaths) { - await this.deleteFile(file); - } + await Promise.all(filePaths.map((file) => { + return this.deleteFile(file); + })); } /**