small fixes

This commit is contained in:
HF 2022-01-14 01:17:03 +01:00
parent 220ead80fd
commit 8f4e1c83b0
2 changed files with 9 additions and 2 deletions

View File

@ -47,7 +47,7 @@ export function clamp(n, min, max) {
*/
export function dateToString(date) {
// YYYY-MM-DD
return ate.substring(0, 4) + date.substring(5, 7) + date.substring(8)
return date.substring(0, 4) + date.substring(5, 7) + date.substring(8);
}
/*

View File

@ -106,7 +106,14 @@ class APISocketServer {
return;
}
const sendmsg = JSON.stringify(['msg', name, id, msg, country, channelId]);
const sendmsg = JSON.stringify([
'msg',
name,
parseInt(id, 10),
msg,
country,
parseInt(channelId, 10),
]);
this.wss.clients.forEach((client) => {
if (client !== ws
&& client.subChat