Manoc-PH / keats-server

The HTTP server of Keats, A nutrition app that helps users know how much they're eating. Built with Go, Fiber, Postgres, and Meilisearch
0 stars 0 forks source link

FIX: Innaccurate nutrient data on saved recipe #36

Open labadcloyd opened 9 months ago

labadcloyd commented 9 months ago

The saved recipe's nutrient is not accurate. The way the math is done may not be right. When getting the recipe's ingredients, the calories should equal to the total calories of all ingredients.

The way the calories is calculated on the recipe details page is the calories being multiplied by the number of servings. The serving size should be the total amount per ingredient divided by the number of servings.

The post recipe doesnt also return the correct serving size.