mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 03:04:36 +00:00
Rework API to be more RESTful (references #139)
This commit is contained in:
@@ -2,7 +2,7 @@ Grocy.Components.ProductCard = { };
|
||||
|
||||
Grocy.Components.ProductCard.Refresh = function(productId)
|
||||
{
|
||||
Grocy.Api.Get('stock/' + productId,
|
||||
Grocy.Api.Get('stock/products/' + productId,
|
||||
function(productDetails)
|
||||
{
|
||||
var stockAmount = productDetails.stock_amount || '0';
|
||||
@@ -58,7 +58,7 @@ Grocy.Components.ProductCard.Refresh = function(productId)
|
||||
}
|
||||
);
|
||||
|
||||
Grocy.Api.Get('stock/' + productId + '/pricehistory',
|
||||
Grocy.Api.Get('stock/products/' + productId + '/price-history',
|
||||
function(priceHistoryDataPoints)
|
||||
{
|
||||
if (priceHistoryDataPoints.length > 0)
|
||||
|
Reference in New Issue
Block a user