From ba7fb6525f50655e4c149e4642cfb6577c2efebd Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 31 Aug 2021 12:27:15 -0400 Subject: [PATCH] Allow VIP to submit poi segments at any time --- src/routes/postSkipSegments.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/postSkipSegments.ts b/src/routes/postSkipSegments.ts index 4e946e9..72f23a1 100644 --- a/src/routes/postSkipSegments.ts +++ b/src/routes/postSkipSegments.ts @@ -390,8 +390,8 @@ async function checkEachSegmentValid(userID: string, videoID: VideoID return { pass: false, errorMessage: "One of your segments times are invalid (too short, startTime before endTime, etc.)", errorCode: 400}; } - // Check for POI segments before 1 second - if (getCategoryActionType(segments[i].category) === CategoryActionType.POI && startTime < config.poiMinimumStartTime) { + // Check for POI segments before some seconds + if (!isVIP && getCategoryActionType(segments[i].category) === CategoryActionType.POI && startTime < config.poiMinimumStartTime) { return { pass: false, errorMessage: `POI cannot be that early`, errorCode: 400}; }