Finish API documentation and token auth (references #5)

This commit is contained in:
Bernd Bestel
2018-04-21 19:18:00 +02:00
parent 9bd6aac09c
commit 99b2a84667
40 changed files with 1617 additions and 128 deletions

View File

@@ -1,7 +1,10 @@
$(document).on('click', '.product-delete-button', function(e)
{
var objectName = $(e.currentTarget).attr('data-product-name');
var objectId = $(e.currentTarget).attr('data-product-id');
bootbox.confirm({
message: L('Are you sure to delete product "#1"?', $(e.currentTarget).attr('data-product-name')),
message: L('Are you sure to delete product "#1"?', objectName),
buttons: {
confirm: {
label: L('Yes'),
@@ -16,7 +19,7 @@
{
if (result === true)
{
Grocy.Api.Get('delete-object/products/' + $(e.currentTarget).attr('data-product-id'),
Grocy.Api.Get('delete-object/products/' + objectId,
function(result)
{
window.location.href = U('/products');