1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-18 18:43:15 +02:00

Tiny web app fixes

This commit is contained in:
binwiederhier 2023-05-15 13:37:30 -04:00
parent 04b7b4284a
commit ed0c1abd2f
3 changed files with 8 additions and 5 deletions
web/src/app

View file

@ -21,8 +21,11 @@ class Api {
const headers = maybeWithAuth({}, user);
console.log(`[Api] Polling ${url}`);
for await (let line of fetchLinesIterator(url, headers)) {
console.log(`[Api, ${shortUrl}] Received message ${line}`);
messages.push(JSON.parse(line));
const message = JSON.parse(line);
if (message.id) {
console.log(`[Api, ${shortUrl}] Received message ${line}`);
messages.push(message);
}
}
return messages;
}