Commit 07ad10ab authored by poslovitch's avatar poslovitch
Browse files

Fixed mean_nutriscore

parent 5fd3b369
......@@ -80,7 +80,7 @@ $app->get('/api/shoppinglists', function (Request $request, Response $response)
} else {
$mean_nutriscore = $article["nutriscore"];
}
$shoppinglist->mean_nutriscore = $mean_nutriscore;
$shoppinglist->mean_nutriscore = $mean_nutriscore/sizeof($articles);
}
$sl_result[] = $shoppinglist;
......@@ -158,7 +158,7 @@ $app->get('/api/shoppinglists/{shoppinglistid}', function (Request $request, Res
} else {
$mean_nutriscore = $article["nutriscore"];
}
$shoppinglist->mean_nutriscore = $mean_nutriscore;
$shoppinglist->mean_nutriscore = $mean_nutriscore/sizeof($articles);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment