diff --git a/index.js b/index.js index 4f6ecf1..b414d22 100755 --- a/index.js +++ b/index.js @@ -88,11 +88,11 @@ wss.on("connection", function connection(ws, req, res) { ws.id = await getUserFromCookie(message.substring(6)); ws.send(ws.id); const updateAccount = accs.query(`UPDATE accounts SET last_login = $login WHERE username = $user`) - updateAccount.get({ $login: new Date().toUTCString(), $user: ws.id }); + await updateAccount.get({ $login: new Date().toUTCString(), $user: ws.id }); } else if (message.startsWith("1")) { if (ws.id) { const updateAccount = accs.query(`UPDATE accounts SET last_login = $login WHERE username = $user`) - updateAccount.get({ $login: new Date().toUTCString(), $user: ws.id }); + await updateAccount.get({ $login: new Date().toUTCString(), $user: ws.id }); } } else if (message.startsWith("annc")) { let splitMessage = message.split(";;");