Fix Volatile Slim Error order in routes and adjust to english noun

This commit is contained in:
Christopher Forkner 2019-01-09 20:30:30 -07:00
parent de0d8d61a7
commit 567f2b83ea
2 changed files with 3 additions and 3 deletions

View File

@ -273,7 +273,7 @@ function RefreshStatistics()
); );
var nextXDays = $("#info-expiring-products").data("next-x-days"); 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) 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))); $("#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)));

View File

@ -109,11 +109,11 @@ $app->group('/api', function()
$this->post('/user/settings/{settingKey}', '\Grocy\Controllers\UsersApiController:SetUserSetting'); $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}', '\Grocy\Controllers\StockApiController:ProductDetails');
$this->get('/stock/{productId}/pricehistory', '\Grocy\Controllers\StockApiController:ProductPriceHistory'); $this->get('/stock/{productId}/pricehistory', '\Grocy\Controllers\StockApiController:ProductPriceHistory');
$this->get('/stock/{productId}/entries', '\Grocy\Controllers\StockApiController:ProductStockEntries'); $this->get('/stock/{productId}/entries', '\Grocy\Controllers\StockApiController:ProductStockEntries');
$this->get('/stock', '\Grocy\Controllers\StockApiController:CurrentStock'); $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}/add/{amount}', '\Grocy\Controllers\StockApiController:AddProduct');
$this->post('/stock/{productId}/consume/{amount}', '\Grocy\Controllers\StockApiController:ConsumeProduct'); $this->post('/stock/{productId}/consume/{amount}', '\Grocy\Controllers\StockApiController:ConsumeProduct');
$this->post('/stock/{productId}/open/{amount}', '\Grocy\Controllers\StockApiController:OpenProduct'); $this->post('/stock/{productId}/open/{amount}', '\Grocy\Controllers\StockApiController:OpenProduct');