From 7f0a35c88aa16774847885ae78d7d79dfa449208 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 29 Dec 2020 15:12:18 -0500 Subject: [PATCH] Fix type issues --- src/routes/getSkipSegments.ts | 2 +- src/routes/getSkipSegmentsByHash.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/getSkipSegments.ts b/src/routes/getSkipSegments.ts index d175e10..5252fce 100644 --- a/src/routes/getSkipSegments.ts +++ b/src/routes/getSkipSegments.ts @@ -72,7 +72,7 @@ function getSegmentsByVideoID(req: Request, videoID: string, categories: Categor } } -function getSegmentsByHash(req: Request, hashedVideoIDPrefix: VideoIDHash, categories: Category[]): Record { +function getSegmentsByHash(req: Request, hashedVideoIDPrefix: VideoIDHash, categories: Category[]): SBRecord { const cache: SegmentCache = {shadowHiddenSegmentIPs: {}}; const segments: SBRecord = {}; diff --git a/src/routes/getSkipSegmentsByHash.ts b/src/routes/getSkipSegmentsByHash.ts index 9273465..5c557ac 100644 --- a/src/routes/getSkipSegmentsByHash.ts +++ b/src/routes/getSkipSegmentsByHash.ts @@ -4,7 +4,7 @@ import {Request, Response} from 'express'; import { Category, VideoIDHash } from '../types/segments.model'; export async function getSkipSegmentsByHash(req: Request, res: Response) { - let hashPrefix: VideoIDHash = req.params.prefix; + let hashPrefix = req.params.prefix as VideoIDHash; if (!hashPrefixTester(req.params.prefix)) { res.status(400).send("Hash prefix does not match format requirements."); // Exit early on faulty prefix return;