fix db
This commit is contained in:
4
index.js
4
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(";;");
|
||||
|
||||
Reference in New Issue
Block a user