mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-09 13:07:02 +03:00
Merge pull request #160 from ajayyy/experimental
Fix example error codes
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
"windowMs": 900000, // 15 minutes
|
"windowMs": 900000, // 15 minutes
|
||||||
"max": 20, // 20 requests in 15min time window
|
"max": 20, // 20 requests in 15min time window
|
||||||
"message": "Too many votes, please try again later",
|
"message": "Too many votes, please try again later",
|
||||||
"statusCode": 200
|
"statusCode": 429
|
||||||
},
|
},
|
||||||
"view": {
|
"view": {
|
||||||
"windowMs": 900000, // 15 minutes
|
"windowMs": 900000, // 15 minutes
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ var oldSubmitSponsorTimes = require('./routes/oldSubmitSponsorTimes.js');
|
|||||||
let voteEndpoints = [voteOnSponsorTime.endpoint];
|
let voteEndpoints = [voteOnSponsorTime.endpoint];
|
||||||
let viewEndpoints = [viewedVideoSponsorTime];
|
let viewEndpoints = [viewedVideoSponsorTime];
|
||||||
if (config.rateLimit) {
|
if (config.rateLimit) {
|
||||||
// if (config.rateLimit.vote) voteEndpoints.unshift(rateLimitMiddleware(config.rateLimit.vote));
|
if (config.rateLimit.vote) voteEndpoints.unshift(rateLimitMiddleware(config.rateLimit.vote));
|
||||||
if (config.rateLimit.view) viewEndpoints.unshift(rateLimitMiddleware(config.rateLimit.view));
|
if (config.rateLimit.view) viewEndpoints.unshift(rateLimitMiddleware(config.rateLimit.view));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,12 +55,12 @@
|
|||||||
"windowMs": 900000,
|
"windowMs": 900000,
|
||||||
"max": 20,
|
"max": 20,
|
||||||
"message": "Too many votes, please try again later",
|
"message": "Too many votes, please try again later",
|
||||||
"statusCode": 200
|
"statusCode": 429
|
||||||
},
|
},
|
||||||
"view": {
|
"view": {
|
||||||
"windowMs": 900000,
|
"windowMs": 900000,
|
||||||
"max": 20,
|
"max": 20,
|
||||||
"statusCode": 200
|
"statusCode": 200
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user