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

Attachment behavior fix for Firefox

This commit is contained in:
Philipp Heckel 2022-04-03 12:39:52 -04:00
parent f98743dd9b
commit aba7e86cbc
13 changed files with 223 additions and 123 deletions
web/src/app

View file

@ -7,7 +7,7 @@ import {
topicUrl,
topicUrlAuth,
topicUrlJsonPoll,
topicUrlJsonPollWithSince
topicUrlJsonPollWithSince, userStatsUrl
} from "./utils";
import userManager from "./UserManager";
@ -93,6 +93,16 @@ class Api {
}
throw new Error(`Unexpected server response ${response.status}`);
}
async userStats(baseUrl) {
const url = userStatsUrl(baseUrl);
console.log(`[Api] Fetching user stats ${url}`);
const response = await fetch(url);
if (response.status !== 200) {
throw new Error(`Unexpected server response ${response.status}`);
}
return response.json();
}
}
const api = new Api();