1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-08-04 13:21:58 +00:00

fix: dex-id url not returning valid cards & filtering not working using dexId (#722)

This commit is contained in:
2025-05-02 00:31:04 +02:00
committed by GitHub
parent 509288ad19
commit 961c75c8a0
7 changed files with 113 additions and 2 deletions

View File

@@ -247,6 +247,15 @@ server
result = Serie.findOne(lang, { name: id })?.full()
}
break
case 'dex-ids': {
result = {
name: parseInt(id, 10),
// @ts-expect-error current behavior is normal
cards: Card.find(lang, { dexId: { $eq: parseInt(id, 10) }})
.map((c) => c.resume())
}
break
}
default:
if (!endpointToField[endpoint]) {
break