diff options
author | Joel Kronqvist <work.joelkronqvist@gmail.com> | 2022-10-15 20:05:32 +0300 |
---|---|---|
committer | Joel Kronqvist <work.joelkronqvist@gmail.com> | 2022-10-15 20:05:32 +0300 |
commit | b2925ef2579050c484a552f2cd9c0ffed11fb1e9 (patch) | |
tree | cf7708162afe815ef855e8af5e9a1012d2587ff6 /update.js | |
parent | 98a7a9947828514372d873b88fcdcdf44a358dd3 (diff) | |
download | LYLLRuoka-b2925ef2579050c484a552f2cd9c0ffed11fb1e9.tar.gz LYLLRuoka-b2925ef2579050c484a552f2cd9c0ffed11fb1e9.zip |
Bug fixes & started setup.sh
Diffstat (limited to 'update.js')
-rw-r--r-- | update.js | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -6,14 +6,12 @@ const parse = require("./dbparse.js"); // Run this if you want to build the database from text files async function buildDB(dbcredentials, shiftPath, ...classfiles) { - let shiftCont = await openFile(shiftPath); const DB = new database.Database(JSON.parse(dbcredentials)); - shiftCont = shiftCont.toString("utf-8").replaceAll("\r", ""); // \r because of the \r\n newline on windows which creates problems + let shiftCont = await openFile(shiftPath); + shiftCont = shiftCont.toString("utf-8").replaceAll("\r", ""); // \r because of the \r\n newline on windows which may create problems - await Promise.all([ - parseClasses(DB, ...classfiles), - parse.build(shiftCont, DB) - ]); + await parseClasses(DB, ...classfiles), + await parse.build(shiftCont, DB) return 0; } @@ -23,4 +21,4 @@ exports.update = buildDB; const openFile = require("./Functions/open.js").file; const dbcredentials = await openFile("../dblogin.txt"); await updateDB.update(dbcredentials, "./shifts.txt", "./Kurssitarjottimet/2016Classes.txt", "./Kurssitarjottimet/NewClasses.txt"); -*/
\ No newline at end of file +*/ |