This commit is contained in:
sky
2026-02-14 16:59:39 -05:00
parent b47c0a64d4
commit 850b98c123

View File

@ -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(";;");