mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2026-01-29 05:40:49 +03:00
Don't ratelimit VIPs
This commit is contained in:
@@ -18,7 +18,7 @@ import {shadowBanUser} from './routes/shadowBanUser';
|
||||
import {getUsername} from './routes/getUsername';
|
||||
import {setUsername} from './routes/setUsername';
|
||||
import {viewedVideoSponsorTime} from './routes/viewedVideoSponsorTime';
|
||||
import {voteOnSponsorTime} from './routes/voteOnSponsorTime';
|
||||
import {voteOnSponsorTime, getUserID as voteGetUserID} from './routes/voteOnSponsorTime';
|
||||
import {getSkipSegmentsByHash} from './routes/getSkipSegmentsByHash';
|
||||
import {postSkipSegments} from './routes/postSkipSegments';
|
||||
import {endpoint as getSkipSegments} from './routes/getSkipSegments';
|
||||
@@ -55,7 +55,7 @@ function setupRoutes(app: Express) {
|
||||
const voteEndpoints: RequestHandler[] = [voteOnSponsorTime];
|
||||
const viewEndpoints: RequestHandler[] = [viewedVideoSponsorTime];
|
||||
if (config.rateLimit) {
|
||||
if (config.rateLimit.vote) voteEndpoints.unshift(rateLimitMiddleware(config.rateLimit.vote));
|
||||
if (config.rateLimit.vote) voteEndpoints.unshift(rateLimitMiddleware(config.rateLimit.vote, voteGetUserID));
|
||||
if (config.rateLimit.view) viewEndpoints.unshift(rateLimitMiddleware(config.rateLimit.view));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user