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:
@@ -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
|
||||
|
Reference in New Issue
Block a user