From 850b98c1236e2f55528f5a2d2c231e5425ef0e9f Mon Sep 17 00:00:00 2001 From: sky Date: Sat, 14 Feb 2026 16:59:39 -0500 Subject: [PATCH] fix db --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(";;");