mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 03:25:50 +00:00
Rework API to be more RESTful (references #139)
This commit is contained in:
@@ -36,7 +36,7 @@ $(document).on('click', '.product-delete-button', function (e)
|
||||
var objectName = $(e.currentTarget).attr('data-product-name');
|
||||
var objectId = $(e.currentTarget).attr('data-product-id');
|
||||
|
||||
Grocy.Api.Get('stock/' + objectId,
|
||||
Grocy.Api.Get('stock/products/' + objectId,
|
||||
function(productDetails)
|
||||
{
|
||||
var stockAmount = productDetails.stock_amount || '0';
|
||||
@@ -59,7 +59,7 @@ $(document).on('click', '.product-delete-button', function (e)
|
||||
{
|
||||
if (result === true)
|
||||
{
|
||||
Grocy.Api.Delete('object/products/' + objectId,
|
||||
Grocy.Api.Delete('objects/products/' + objectId, {},
|
||||
function (result)
|
||||
{
|
||||
window.location.href = U('/products');
|
||||
|
Reference in New Issue
Block a user