aboutsummaryrefslogtreecommitdiff
path: root/parseClasses.js
diff options
context:
space:
mode:
Diffstat (limited to 'parseClasses.js')
-rw-r--r--parseClasses.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/parseClasses.js b/parseClasses.js
index ffd8e7f..b114f33 100644
--- a/parseClasses.js
+++ b/parseClasses.js
@@ -56,13 +56,12 @@ function addToDBFromLists(DB, l1, l2, l1cond, l2cond)
}
}
-async function parseClasses(path1, path2, DB)
+async function parseClasses(DB, ...paths)
{
let parsed = [];
await DB.query_raw("DELETE FROM classes");
- parsed.push(parseClassData(path1, DB));
- if (path2 !== undefined)
- parsed.push(parseClassData(path2, DB));
+ for(const path of paths)
+ parsed.push(parseClassData(path, DB))
return await Promise.all(parsed);
}