Update Api
This commit is contained in:
parent
83cee48d36
commit
6ba1459848
1 changed files with 5 additions and 4 deletions
|
@ -93,9 +93,9 @@ class PostHandler
|
|||
else $article["generic"] = $product["generic_name"];
|
||||
}
|
||||
else {
|
||||
$article["nutri-score"] = "";
|
||||
$article["generic"] = "";
|
||||
$article["ingredients"] = "";
|
||||
$article["nutri-score"] = null;
|
||||
$article["generic"] = null;
|
||||
$article["ingredients"] = null;
|
||||
}
|
||||
array_push($formatted_articles, $article);
|
||||
}
|
||||
|
@ -103,7 +103,8 @@ class PostHandler
|
|||
return $formatted_articles;
|
||||
}
|
||||
|
||||
private function get_openfoodfacts_product($barcode){
|
||||
private function get_openfoodfacts_product($barcode)
|
||||
{
|
||||
$country = 'fr';
|
||||
$productSlug = 'produit';
|
||||
$url = 'https://{country}.openfoodfacts.org/api/v0/{product}/{scan}.json';
|
||||
|
|
Loading…
Reference in a new issue