This commit is contained in:
2019-06-12 00:02:01 +10:00
parent 2f28498e5b
commit 76c6a6411f
+1 -1
View File
@@ -216,7 +216,7 @@ const loginRequest = (connection) => (req, res) => {
} }
//create the new session //create the new session
let rand = Math.floor(Math.random() * Number.MAX_SAFE_INTEGER); let rand = Math.floor(Math.random() * 2000000000);
let query = 'INSERT INTO sessions (accountId, token) VALUES (?, ?);'; let query = 'INSERT INTO sessions (accountId, token) VALUES (?, ?);';
connection.query(query, [results[0].id, rand], (err) => { connection.query(query, [results[0].id, rand], (err) => {