mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-16 08:26:59 +03:00
Only accept new user count if higher + add to example config
This commit is contained in:
@@ -39,7 +39,7 @@ module.exports = function getTotalStats (req, res) {
|
||||
function updateExtensionUsers() {
|
||||
if (config.userCounterURL) {
|
||||
request.get(config.userCounterURL + "/api/v1/userCount", (err, response, body) => {
|
||||
apiUsersCache = JSON.parse(body).userCount;
|
||||
apiUsersCache = Math.max(apiUsersCache, JSON.parse(body).userCount);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user