mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-16 08:26:59 +03:00
update dependencies, add shims for node-fetch v3
This commit is contained in:
@@ -45,7 +45,7 @@ export async function getTotalStats(req: Request, res: Response): Promise<void>
|
||||
function updateExtensionUsers() {
|
||||
if (config.userCounterURL) {
|
||||
fetch(`${config.userCounterURL}/api/v1/userCount`)
|
||||
.then(res => res.json())
|
||||
.then(res => res.json() as Record<string, any>)
|
||||
.then(data => {
|
||||
apiUsersCache = Math.max(apiUsersCache, data.userCount);
|
||||
})
|
||||
@@ -56,7 +56,7 @@ function updateExtensionUsers() {
|
||||
const chromeExtensionUrl = "https://chrome.google.com/webstore/detail/sponsorblock-for-youtube/mnjggcdmjocbbbhaepdhchncahnbgone";
|
||||
|
||||
fetch(mozillaAddonsUrl)
|
||||
.then(res => res.json())
|
||||
.then(res => res.json() as Record<string, any>)
|
||||
.then(data => {
|
||||
firefoxUsersCache = data.average_daily_users;
|
||||
fetch(chromeExtensionUrl)
|
||||
|
||||
Reference in New Issue
Block a user