added ability to query mysql database

This commit is contained in:
Joe-Dowd
2020-07-05 04:14:15 +01:00
parent 325981b9c9
commit 46dd16caf9
22 changed files with 183 additions and 114 deletions

View File

@@ -15,7 +15,7 @@ module.exports = function getUsername (req, res) {
userID = getHash(userID);
try {
let row = db.prepare("SELECT userName FROM userNames WHERE userID = ?").get(userID);
let row = db.prepare('get', "SELECT userName FROM userNames WHERE userID = ?", [userID]);
if (row !== undefined) {
res.send({