From 2a7083b9ef5346bed88ff58ce7b75564fb6bc02b Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 30 Dec 2022 15:07:59 -0500 Subject: [PATCH] Remove hash from result to save bandwidth --- src/routes/getBranding.ts | 2 -- src/types/branding.model.ts | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/routes/getBranding.ts b/src/routes/getBranding.ts index eae6962..dff3602 100644 --- a/src/routes/getBranding.ts +++ b/src/routes/getBranding.ts @@ -81,7 +81,6 @@ export async function getVideoBrandingByHash(videoHashPrefix: VideoIDHash, servi const dbResult: Record = {}; const initResult = (submission: BrandingDBSubmission) => { dbResult[submission.videoID] = dbResult[submission.videoID] || { - hash: submission.hashedVideoID, branding: { titles: [], thumbnails: [] @@ -110,7 +109,6 @@ export async function getVideoBrandingByHash(videoHashPrefix: VideoIDHash, servi await Promise.all(Object.keys(branding).map(async (key) => { const castedKey = key as VideoID; processedResult[castedKey] = { - hash: branding[castedKey].hash, branding: await filterAndSortBranding(branding[castedKey].branding.titles, branding[castedKey].branding.thumbnails, ip, cache) }; })); diff --git a/src/types/branding.model.ts b/src/types/branding.model.ts index 69bf35d..228c93b 100644 --- a/src/types/branding.model.ts +++ b/src/types/branding.model.ts @@ -45,7 +45,6 @@ export interface BrandingResult { } export interface BrandingHashDBResult { - hash: VideoIDHash; branding: { titles: TitleDBResult[], thumbnails: ThumbnailDBResult[] @@ -53,6 +52,5 @@ export interface BrandingHashDBResult { } export interface BrandingHashResult { - hash: VideoIDHash; branding: BrandingResult; } \ No newline at end of file