From 79c9be98b37ec13e6b946d2b4d7e99f5a0ab8cc4 Mon Sep 17 00:00:00 2001 From: Guyutongxue Date: Mon, 30 Dec 2024 11:11:08 +0800 Subject: [PATCH] only redirect cardface to hakushin --- api/v2/images/[id].js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api/v2/images/[id].js b/api/v2/images/[id].js index 542b1ab..c41e751 100644 --- a/api/v2/images/[id].js +++ b/api/v2/images/[id].js @@ -28,6 +28,11 @@ export default function handler(req, res) { .send("Not found"); return; } - const url = `https://api.hakush.in/gi/UI/${image}.webp`; + let url; + if (image.includes("CardFace")) { + url = `https://api.hakush.in/gi/UI/${image}.webp`; + } else { + url = `https://assets.gi-tcg.guyutongxue.site/assets/${image}.webp?thumb=${thumb}`; + } res.status(307).setHeader("Location", url).send(void 0); } \ No newline at end of file