diff options
author | LarsVomMars | 2020-10-10 13:18:17 +0200 |
---|---|---|
committer | LarsVomMars | 2020-10-10 13:18:17 +0200 |
commit | 5ad5d0968b8f7948bf076567b5f42f9a8bdb3cc0 (patch) | |
tree | 08e193c565e52f490abb5f12c8bad83df16e6cf3 /db.js | |
parent | 3b16ab7ebee3d432a66d7966a2e8a6c2541f3912 (diff) | |
parent | d99c8fd5281d32b6f1ef5174e403f0b0ee9ad522 (diff) |
Merge branch 'profile' of github.com:marvinborner/abizeugs into profile
Diffstat (limited to 'db.js')
-rw-r--r-- | db.js | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -77,6 +77,15 @@ class DB { }); }); + fs.readFile(__dirname + "/profile.txt", "utf8", (err, data) => { + if (err) throw err; + + const questions = data.split("\n"); + questions.forEach((question) => { + if (question) this.query("INSERT INTO profile_questions (question) VALUE (?)", [question]); + }); + }); + const classes = data.split("--"); const userPasswords = {}; console.log("Generating users"); |