1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-06-29 07:19:19 +00:00

fix: Misc Endpoints not working as intended (#181)

Signed-off-by: Avior <github@avior.me>
This commit is contained in:
2021-11-22 14:46:03 +01:00
committed by GitHub
parent ac3a62c0ec
commit 227637fd97
6 changed files with 40 additions and 19 deletions

View File

@ -163,6 +163,7 @@ server
break
default:
result = Card.find(lang, {[endpointToField[endpoint]]: id})
.map((c) => c.resume())
}
if (!result) {
return res.status(404).send({error: "Endpoint or id not found"})