Remove logging and fix voting error

This commit is contained in:
Ajay Ramachandran 2021-02-20 22:06:00 -05:00
parent 8c910b67b4
commit eeaa1614fa
2 changed files with 1 additions and 2 deletions

View file

@ -223,7 +223,6 @@ async function handleGetSegments(req: Request, res: Response): Promise<Segment[]
const videoID = req.query.videoID as VideoID; const videoID = req.query.videoID as VideoID;
// Default to sponsor // Default to sponsor
// If using params instead of JSON, only one category can be pulled // If using params instead of JSON, only one category can be pulled
console.log(req.query.categories)
const categories = req.query.categories const categories = req.query.categories
? JSON.parse(req.query.categories as string) ? JSON.parse(req.query.categories as string)
: req.query.category : req.query.category

View file

@ -388,7 +388,7 @@ export async function voteOnSponsorTime(req: Request, res: Response) {
} }
// Clear redis cache for this video // Clear redis cache for this video
redis.delAsync(skipSegmentsKey(row.videoID)); redis.delAsync(skipSegmentsKey(row?.videoID));
//for each positive vote, see if a hidden submission can be shown again //for each positive vote, see if a hidden submission can be shown again
if (incrementAmount > 0 && voteTypeEnum === voteTypes.normal) { if (incrementAmount > 0 && voteTypeEnum === voteTypes.normal) {