From 20ae560bb1ac42c73738710ad66014151b9c59bd Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Wed, 16 Jun 2021 13:23:25 -0400 Subject: [PATCH] Add semicolons --- src/routes/getSegmentInfo.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/getSegmentInfo.ts b/src/routes/getSegmentInfo.ts index af7063d..4262998 100644 --- a/src/routes/getSegmentInfo.ts +++ b/src/routes/getSegmentInfo.ts @@ -10,9 +10,9 @@ async function getSegmentFromDBByUUID(UUID: SegmentUUID): Promise { `SELECT "videoID", "startTime", "endTime", "votes", "locked", "UUID", "userID", "timeSubmitted", "views", "category", "service", "videoDuration", "hidden", "reputation", "shadowHidden" FROM "sponsorTimes" - WHERE "UUID" = ?`, [UUID]) + WHERE "UUID" = ?`, [UUID]); } catch (err) { - return null + return null; } } @@ -25,7 +25,7 @@ async function getSegmentsByUUID(UUIDs: SegmentUUID[]): Promise { } DBSegments.push(await getSegmentFromDBByUUID(UUID as SegmentUUID)); } - return DBSegments + return DBSegments; } async function handleGetSegmentInfo(req: Request, res: Response) { @@ -34,7 +34,7 @@ async function handleGetSegmentInfo(req: Request, res: Response) { ? JSON.parse(req.query.UUIDs as string) : req.query.UUID ? [req.query.UUID] - : null + : null; // deduplicate with set UUIDs = [ ...new Set(UUIDs)]; // if more than 10 entries, slice