Skip to content

Commit

Permalink
Fixed issue with graph data
Browse files Browse the repository at this point in the history
  • Loading branch information
rohithThammaiah committed Jun 18, 2024
1 parent f4207e7 commit 3155fd0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions routes/prices.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ router.get("/v2/latest", (req, res) => {
LatestPrice.find({})
.then((latestPrices) => {
latestPrices.map(function (price) {
let lastWeekPrices = groupedSpices[price.spiceName];
price.graphData = lastWeekPrices;
price.graphData = groupedSpices.get(price.spiceName);
return price;
});
res.send({ status: SUCCESS, data: latestPrices });
Expand Down

0 comments on commit 3155fd0

Please sign in to comment.