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

UI work, config.js stuff

This commit is contained in:
binwiederhier 2022-12-21 13:19:07 -05:00
parent 2b833413cf
commit d982ce13f5
18 changed files with 173 additions and 131 deletions
web/src/app

View file

@ -125,7 +125,9 @@ class Api {
const response = await fetch(url, {
headers: maybeWithBasicAuth({}, user)
});
if (response.status !== 200) {
if (response.status === 401 || response.status === 403) {
return false;
} else if (response.status !== 200) {
throw new Error(`Unexpected server response ${response.status}`);
}
const json = await response.json();