Use absolute URLs everywhere, this should fix #3

This commit is contained in:
Bernd Bestel
2018-04-18 19:03:39 +02:00
parent 3d1c6fc5f0
commit 607a90cccc
36 changed files with 207 additions and 159 deletions

View File

@@ -4,10 +4,10 @@
if (Grocy.EditMode === 'create')
{
Grocy.PostJson('/api/add-object/quantity_units', $('#quantityunit-form').serializeJSON(),
Grocy.Api.Post('add-object/quantity_units', $('#quantityunit-form').serializeJSON(),
function(result)
{
window.location.href = '/quantityunits';
window.location.href = U('/quantityunits');
},
function(xhr)
{
@@ -17,10 +17,10 @@
}
else
{
Grocy.PostJson('/api/edit-object/quantity_units/' + Grocy.EditObjectId, $('#quantityunit-form').serializeJSON(),
Grocy.Api.Post('edit-object/quantity_units/' + Grocy.EditObjectId, $('#quantityunit-form').serializeJSON(),
function(result)
{
window.location.href = '/quantityunits';
window.location.href = U('/quantityunits');
},
function(xhr)
{