From 3c4a769b9c9f0d1b68a6c6466f55c1306baccaac Mon Sep 17 00:00:00 2001 From: degygii <lukas.gygi@gmail.com> Date: Sun, 11 Dec 2016 02:13:55 +0100 Subject: [PATCH] fixed issues with _id and id --- tools/groups.tool | 2 +- tools/users.tool | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/groups.tool b/tools/groups.tool index e3e3757..adf858b 100644 --- a/tools/groups.tool +++ b/tools/groups.tool @@ -191,7 +191,7 @@ } if (changed) { amivcore.groups.PATCH({ - id: curUserData.id, + id: curUserData._id, header: { 'If-Match': $('.groups-edit-cont').attr('data-etag') }, diff --git a/tools/users.tool b/tools/users.tool index b4bf41b..12d5113 100644 --- a/tools/users.tool +++ b/tools/users.tool @@ -111,7 +111,7 @@ id: $(this).attr('data-id') }, function(ret) { curUserData = ret; - var tmp = '<table class="table table-hover users-user-edit-table" data-etag="' + ret['_etag'] + '" data-id="' + ret.id + '"><tbody>'; + var tmp = '<table class="table table-hover users-user-edit-table" data-etag="' + ret['_etag'] + '" data-id="' + ret._id + '"><tbody>'; for (var cur in ret) if (cur.charAt(0) != '_') tmp += '<tr><td>' + cur + '</td><td contenteditable>' + ret[cur] + '</td></tr>' @@ -168,7 +168,7 @@ } if (changed) { amivcore.users.PATCH({ - id: curUserData.id, + id: curUserData._id, header: { 'If-Match': $('.users-user-edit-table').attr('data-etag') }, -- GitLab