Skip to content

Commit

Permalink
only redirect cardface to hakushin
Browse files Browse the repository at this point in the history
  • Loading branch information
guyutongxue committed Dec 30, 2024
1 parent 82c5ab0 commit 79c9be9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/v2/images/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 79c9be9

Please sign in to comment.