Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
guyutongxue committed Jan 24, 2025
1 parent bcc6e65 commit 7e95a2e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/v2/data/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export default async function handler(req, res) {
}
if (id.endsWith(".webp")) {
await fetch(`https://gi-tcg-card-data-img.vercel.app/${id}`)
.then((r) => r.arrayBuffer())
.then((r) =>
r.ok ? r.arrayBuffer() : Promise.reject(new Error(`${r.status}`)),
)
.then((buf) => {
res
.status(200)
Expand Down

0 comments on commit 7e95a2e

Please sign in to comment.