Disable IP ratelimiting

This commit is contained in:
Ajay Ramachandran
2020-05-16 16:54:51 -04:00
parent 34a33bbda1
commit 88a9628e7e

View File

@@ -178,6 +178,8 @@ module.exports = async function postSkipSegments(req, res) {
let yesterday = timeSubmitted - 86400000;
// Disable IP ratelimiting for now
if (false) {
//check to see if this ip has submitted too many sponsors today
let rateLimitCheckRow = privateDB.prepare("SELECT COUNT(*) as count FROM sponsorTimes WHERE hashedIP = ? AND videoID = ? AND timeSubmitted > ?").get([hashedIP, videoID, yesterday]);
@@ -187,6 +189,7 @@ module.exports = async function postSkipSegments(req, res) {
return;
}
}
//check to see if the user has already submitted sponsors for this video
let duplicateCheckRow = db.prepare("SELECT COUNT(*) as count FROM sponsorTimes WHERE userID = ? and videoID = ?").get([userID, videoID]);