mirror of
https://github.com/tcgdex/compiler.git
synced 2025-07-01 19:29:19 +00:00
Fixed images fetched not correct
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
2
dist
2
dist
Submodule dist updated: 04d198136b...1e7d47d502
@ -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}`
|
||||
}
|
||||
|
Reference in New Issue
Block a user