mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-06-28 23:09:18 +00:00
fix: StringEndpoint not corresponding to the docs (#210)
This commit is contained in:
@ -162,8 +162,11 @@ server
|
||||
}
|
||||
break
|
||||
default:
|
||||
result = Card.find(lang, {[endpointToField[endpoint]]: id})
|
||||
result = {
|
||||
name: id,
|
||||
cards: Card.find(lang, {[endpointToField[endpoint]]: id})
|
||||
.map((c) => c.resume())
|
||||
}
|
||||
}
|
||||
if (!result) {
|
||||
return res.status(404).send({error: "Endpoint or id not found"})
|
||||
|
Reference in New Issue
Block a user