From 6caab2ef06be5b48271bcfe19468b366dae4465e Mon Sep 17 00:00:00 2001 From: Michael C Date: Tue, 19 Oct 2021 23:23:58 -0400 Subject: [PATCH] don't destructure and re-structure --- src/routes/voteOnSponsorTime.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/routes/voteOnSponsorTime.ts b/src/routes/voteOnSponsorTime.ts index e6e41ea..3dc10de 100644 --- a/src/routes/voteOnSponsorTime.ts +++ b/src/routes/voteOnSponsorTime.ts @@ -60,8 +60,7 @@ function getYouTubeVideoInfo(videoID: VideoID, ignoreCache = false): Promise (APIDuration > 0 && Math.abs(segmentDuration - APIDuration) > 2); async function checkVideoDurationChange(UUID: SegmentUUID) { - const row = await db.prepare("get", `select "videoDuration", "videoID", "service" from "sponsorTimes" where "UUID" = ?`, [UUID]); - const { videoDuration, videoID, service } = row; + const { videoDuration, videoID, service } = await db.prepare("get", `select "videoDuration", "videoID", "service" from "sponsorTimes" where "UUID" = ?`, [UUID]); let apiVideoInfo: APIVideoInfo = null; if (service == Service.YouTube) { // don't use cache since we have no information about the video length