Beispiel #1
0
    //ajoute un frigo
});
$app->put('/ModifFrigo', function () {
    Frigo::ModifFrigo($_POST["userid"], $_POST["ingredientid"], $_POST["id"]);
    //ajoute un frigo
});
$app->delete('/DelFrigo', function () {
    Frigo::ModifFrigo($_POST["id"]);
    //ajoute un frigo
});
/*--------------------------------------------------
					INGREDIENT
--------------------------------------------------*/
$app->get('/getIngredientByID/:ingredientID', function ($ingredientID) {
    //renvoi les infos de l'ingrédient
    $ingredient = Ingredient::getIngredientById($ingredientID);
});
$app->get('/getIngredientByNom/:nom', function ($nom) {
    //renvoi les infos de l'ingredient
    $ingredient = Ingredient::getIngredientByName($nom);
});
$app->get('/getIngredientByPrix/:prix', function ($prix) {
    //renvoi les infos de l'ingredient dont le prix est < ou =
    $ingredient = Ingredient::getIngredientByPrix($prix);
});
$app->get('/getIngredientByCategorie/:categorie', function ($categorie) {
    //renvoi tous les ingredients de la catégorie
    $ingredient = Ingredient::getIngredientByCategorie($categorie);
});
$app->get('/getAllIngredient', function () {
    //renvoi tous les ingredients