Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
taugk committed Dec 17, 2023
1 parent d66570d commit 454b367
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routes/postsRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ router.get("/recommendation/homefood", async (req, res) => {
const sortHomefood = withDistance.sort((a, b) => a.distance - b.distance);

const homefoodPost = sortHomefood.slice(0, 5);
res.status(200).json({ homefood: homefoodPost });
res.status(200).json({ posts: homefoodPost });
} catch (error) {
console.error("Error fetching nearby homefood recommendations", error);
res.status(500).json({ message: "Internal server error" });
Expand Down Expand Up @@ -374,7 +374,7 @@ router.get("/recommendation/rawIngredients", async (req, res) => {
const sort = withDistance.sort((a, b) => a.distance - b.distance);

const rawIngredientsPost = sort.slice(0, 5);
res.status(200).json({ raw_ingredients: rawIngredientsPost });
res.status(200).json({ posts: rawIngredientsPost });
} catch (error) {
console.error(
"Error fetching nearby raw ingredients recommendations",
Expand Down

0 comments on commit 454b367

Please sign in to comment.