mirror of
https://github.com/tcgdex/compiler.git
synced 2025-04-22 10:42:09 +00:00
Fixed images fetched not correct
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
8d19e46c2c
commit
40206cb4ee
2
dist
2
dist
@ -1 +1 @@
|
||||
Subproject commit 04d198136bf93109442bee82f0b3abf038d9f4c8
|
||||
Subproject commit 1e7d47d502f84849ac8aa9f9e689cc83252f6b95
|
@ -25,7 +25,7 @@ export async function cardToCardSimple(id: string, card: Card, lang: SupportedLa
|
||||
export async function getCardPictures(cardId: string, card: Card, lang: SupportedLanguages): Promise<string | undefined> {
|
||||
try {
|
||||
const file = await fetchRemoteFile(`https://assets.tcgdex.net/datas.json`)
|
||||
const fileExists = !!file[lang]?.[card.set.serie.code]?.[card.set.code]?.[card.localId]
|
||||
const fileExists = !!file[lang]?.[card.set.serie.id]?.[card.set.id]?.[cardId]
|
||||
if (fileExists) {
|
||||
return `https://assets.tcgdex.net/${lang}/${card.set.serie.id}/${card.set.id}/${cardId}`
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user