diff --git a/public/viewjs/stockoverview.js b/public/viewjs/stockoverview.js index 4d95fd9f..dee687df 100644 --- a/public/viewjs/stockoverview.js +++ b/public/viewjs/stockoverview.js @@ -273,7 +273,7 @@ function RefreshStatistics() ); var nextXDays = $("#info-expiring-products").data("next-x-days"); - Grocy.Api.Get('stock/volatil?expiring_days=' + nextXDays, + Grocy.Api.Get('stock/volatile?expiring_days=' + nextXDays, function(result) { $("#info-expiring-products").text(Pluralize(result.expiring_products.length, L('#1 product expires within the next #2 days', result.expiring_products.length, nextXDays), L('#1 products expiring within the next #2 days', result.expiring_products.length, nextXDays))); diff --git a/routes.php b/routes.php index 71130f8a..209dd69e 100644 --- a/routes.php +++ b/routes.php @@ -108,12 +108,12 @@ $app->group('/api', function() $this->get('/user/settings/{settingKey}', '\Grocy\Controllers\UsersApiController:GetUserSetting'); $this->post('/user/settings/{settingKey}', '\Grocy\Controllers\UsersApiController:SetUserSetting'); - // Stock + // Stock + $this->get('/stock/volatile', '\Grocy\Controllers\StockApiController:CurrentVolatilStock'); $this->get('/stock/{productId}', '\Grocy\Controllers\StockApiController:ProductDetails'); $this->get('/stock/{productId}/pricehistory', '\Grocy\Controllers\StockApiController:ProductPriceHistory'); $this->get('/stock/{productId}/entries', '\Grocy\Controllers\StockApiController:ProductStockEntries'); $this->get('/stock', '\Grocy\Controllers\StockApiController:CurrentStock'); - $this->get('/stock/volatile', '\Grocy\Controllers\StockApiController:CurrentVolatilStock'); $this->post('/stock/{productId}/add/{amount}', '\Grocy\Controllers\StockApiController:AddProduct'); $this->post('/stock/{productId}/consume/{amount}', '\Grocy\Controllers\StockApiController:ConsumeProduct'); $this->post('/stock/{productId}/open/{amount}', '\Grocy\Controllers\StockApiController:OpenProduct');