added button to add expired products to shoppinglist (#1026)

* added button to add expired products to shoppinglist

* Localizations are managed via Transifex

Revert "added button to add expired products to shoppinglist"

This reverts commit ad1ab5d6a0.

* Revert unnecessary change

* Reuse existing function (GetExpiringProducts) to get expired products

Co-authored-by: Mario Klug <mario.klug@sourcefactory.at>
Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
SourceFactory.at
2020-10-04 15:20:34 +02:00
committed by GitHub
parent 49588508bb
commit 617b25bda8
7 changed files with 116 additions and 0 deletions

View File

@@ -212,6 +212,7 @@ $app->group('/api', function (RouteCollectorProxy $group) {
if (GROCY_FEATURE_FLAG_SHOPPINGLIST)
{
$group->post('/stock/shoppinglist/add-missing-products', '\Grocy\Controllers\StockApiController:AddMissingProductsToShoppingList');
$group->post('/stock/shoppinglist/add-expired-products', '\Grocy\Controllers\StockApiController:AddExpiredProductsToShoppingList');
$group->post('/stock/shoppinglist/clear', '\Grocy\Controllers\StockApiController:ClearShoppingList');
$group->post('/stock/shoppinglist/add-product', '\Grocy\Controllers\StockApiController:AddProductToShoppingList');
$group->post('/stock/shoppinglist/remove-product', '\Grocy\Controllers\StockApiController:RemoveProductFromShoppingList');