GetById should only return single wine object.

This commit is contained in:
2021-04-29 17:22:47 +02:00
parent c0d98af6e1
commit a700de6e2e

View File

@@ -36,9 +36,9 @@ function wineByEAN(req, res) {
function wineById(req, res) { function wineById(req, res) {
const { id } = req.params; const { id } = req.params;
return vinmonopoletRepository.wineById(id).then(wines => return vinmonopoletRepository.wineById(id).then(wine =>
res.json({ res.json({
wine: wines[0], wine: wine,
success: true success: true
}) })
) )