1
0
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:
2021-12-15 10:50:47 +01:00
committed by GitHub
parent fe7f6a0738
commit 0f05a63198
4 changed files with 171 additions and 235 deletions

View File

@ -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"})