Fix ACL and archived REST endpoints

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2019-06-30 12:10:47 +02:00
parent cc4439517d
commit 1811dc73b7
7 changed files with 20 additions and 12 deletions

View File

@@ -172,7 +172,8 @@ app.factory('BoardService', function (ApiService, $http, $q) {
var deferred = $q.defer();
var self = this;
$http.delete(this.baseUrl + '/' + acl.boardId + '/acl/' + acl.id).then(function (response) {
delete board.acl[response.data.id];
var index = board.acl.findIndex((item) => item.id === response.data.id);
delete board.acl[index];
if (response.data.type === OC.Share.SHARE_TYPE_USER) {
self._updateUsers();
} else {
@@ -192,7 +193,8 @@ app.factory('BoardService', function (ApiService, $http, $q) {
var self = this;
var _acl = acl;
$http.put(this.baseUrl + '/' + acl.boardId + '/acl', _acl).then(function (response) {
board.acl[_acl.id] = response.data;
var index = board.acl.findIndex((item) => item.id === _acl.id);
board.acl[index] = response.data;
if (response.data.type === OC.Share.SHARE_TYPE_USER) {
self._updateUsers();
} else {