Merge pull request #208 from ajayyy/redis

Remove logging and fix voting error
This commit is contained in:
Ajay Ramachandran 2021-02-20 22:06:27 -05:00 committed by GitHub
commit e51ebdcad6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;
// Default to sponsor
// If using params instead of JSON, only one category can be pulled
console.log(req.query.categories)
const categories = req.query.categories
? JSON.parse(req.query.categories as string)
: req.query.category

View file

@ -388,7 +388,7 @@ export async function voteOnSponsorTime(req: Request, res: Response) {
}
// 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
if (incrementAmount > 0 && voteTypeEnum === voteTypes.normal) {