GetById should only return single wine object.
This commit is contained in:
@@ -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
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user