changed http code on "no messages"

This commit is contained in:
Baipyrus 2023-01-18 14:43:12 +01:00
parent f227016148
commit 703b11c79c

View File

@ -188,14 +188,13 @@ function cmd_msg(input) {
}).then(res => {
if (res.status === 200)
return res.json();
else if (res.status === 100)
else if (res.status === 204)
return;
cmd_exit();
outputText({output: "Error occurred while fetching messages!"});
}).then(res => {
if (res === undefined)
return;
console.log(res);
for (const user in res)
for (const msg of res[user])
outputText({output: msg});