From 1c7a40acc24d204209716ca1114f34221afd95ee Mon Sep 17 00:00:00 2001 From: dragongoose Date: Tue, 11 Apr 2023 14:34:18 -0400 Subject: [PATCH] Add missing image proxy --- util/scraping/extractor/index.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/util/scraping/extractor/index.ts b/util/scraping/extractor/index.ts index 3b397df..2293089 100644 --- a/util/scraping/extractor/index.ts +++ b/util/scraping/extractor/index.ts @@ -410,7 +410,7 @@ export class TwitchAPI { const formatedGameData = { name: rawGameData.name, - cover: rawGameData.avatarURL, + cover: `${process.env.URL}/proxy/img/${base64(rawGameData.avatarURL)}`, description: rawGameData.description, viewers: rawGameData.viewersCount, followers: rawGameData.followersCount, @@ -453,9 +453,9 @@ export class TwitchAPI { title: badge.title, version: badge.version, images: { - image1x: badge.image1x, - image2x: badge.image2x, - image4x: badge.image4x, + image1x: `${process.env.url}/proxy/img/${base64(badge.image1x)}`, + image2x: `${process.env.url}/proxy/img/${base64(badge.image2x)}`, + image4x: `${process.env.url}/proxy/img/${base64(badge.image4x)}`, } } @@ -496,9 +496,9 @@ export class TwitchAPI { title: badge.title, version: badge.version, images: { - image1x: badge.image1x, - image2x: badge.image2x, - image4x: badge.image4x, + image1x: `${process.env.url}/proxy/img/${base64(badge.image1x)}`, + image2x: `${process.env.url}/proxy/img/${base64(badge.image2x)}`, + image4x: `${process.env.url}/proxy/img/${base64(badge.image4x)}`, } }