From 73b7332639815427d90086cc8d393f1fbb6ce6ad Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sun, 11 Oct 2020 12:42:02 -0400 Subject: [PATCH] Add vote rate limit to views as well --- src/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.js b/src/app.js index 0f12117..1aba966 100644 --- a/src/app.js +++ b/src/app.js @@ -66,8 +66,8 @@ app.get('/api/voteOnSponsorTime', voteRateLimitMiddleware, voteOnSponsorTime.end app.post('/api/voteOnSponsorTime', voteRateLimitMiddleware, voteOnSponsorTime.endpoint); //Endpoint when a sponsorTime is used up -app.get('/api/viewedVideoSponsorTime', viewedVideoSponsorTime); -app.post('/api/viewedVideoSponsorTime', viewedVideoSponsorTime); +app.get('/api/viewedVideoSponsorTime', voteRateLimitMiddleware, viewedVideoSponsorTime); +app.post('/api/viewedVideoSponsorTime', voteRateLimitMiddleware, viewedVideoSponsorTime); //To set your username for the stats view app.post('/api/setUsername', setUsername);