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:
parent
2b833413cf
commit
d982ce13f5
18 changed files with 173 additions and 131 deletions
web/src/app
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue