mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-18 02:41:15 +02:00
resolve issues with id on api calls
This commit is contained in:
parent
ea24d72f01
commit
e03d4d52c4
@ -75,9 +75,9 @@
|
|||||||
if ($scope.useGroups) {
|
if ($scope.useGroups) {
|
||||||
collection.groupIds = [];
|
collection.groupIds = [];
|
||||||
|
|
||||||
for (var id in $scope.selectedGroups) {
|
for (var groupId in $scope.selectedGroups) {
|
||||||
if ($scope.selectedGroups.hasOwnProperty(id)) {
|
if ($scope.selectedGroups.hasOwnProperty(groupId)) {
|
||||||
collection.groupIds.push(id);
|
collection.groupIds.push(groupId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,14 +88,17 @@
|
|||||||
if ($scope.useGroups) {
|
if ($scope.useGroups) {
|
||||||
collection.groupIds = [];
|
collection.groupIds = [];
|
||||||
|
|
||||||
for (var id in $scope.selectedGroups) {
|
for (var groupId in $scope.selectedGroups) {
|
||||||
if ($scope.selectedGroups.hasOwnProperty(id)) {
|
if ($scope.selectedGroups.hasOwnProperty(groupId)) {
|
||||||
collection.groupIds.push(id);
|
collection.groupIds.push(groupId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.submitPromise = apiService.collections.put({ orgId: $state.params.orgId }, collection, function (response) {
|
$scope.submitPromise = apiService.collections.put({
|
||||||
|
orgId: $state.params.orgId,
|
||||||
|
id: id
|
||||||
|
}, collection, function (response) {
|
||||||
$analytics.eventTrack('Edited Collection');
|
$analytics.eventTrack('Edited Collection');
|
||||||
var decCollection = cipherService.decryptCollection(response, $state.params.orgId, true);
|
var decCollection = cipherService.decryptCollection(response, $state.params.orgId, true);
|
||||||
$uibModalInstance.close(decCollection);
|
$uibModalInstance.close(decCollection);
|
||||||
|
@ -67,14 +67,17 @@
|
|||||||
|
|
||||||
if (!group.accessAll) {
|
if (!group.accessAll) {
|
||||||
group.collectionIds = [];
|
group.collectionIds = [];
|
||||||
for (var id in $scope.selectedCollections) {
|
for (var collId in $scope.selectedCollections) {
|
||||||
if ($scope.selectedCollections.hasOwnProperty(id)) {
|
if ($scope.selectedCollections.hasOwnProperty(collId)) {
|
||||||
group.collectionIds.push(id);
|
group.collectionIds.push(collId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.submitPromise = apiService.groups.put({ orgId: $state.params.orgId }, group, function (response) {
|
$scope.submitPromise = apiService.groups.put({
|
||||||
|
orgId: $state.params.orgId,
|
||||||
|
id: id
|
||||||
|
}, group, function (response) {
|
||||||
$analytics.eventTrack('Edited Group');
|
$analytics.eventTrack('Edited Group');
|
||||||
$uibModalInstance.close({
|
$uibModalInstance.close({
|
||||||
id: response.Id,
|
id: response.Id,
|
||||||
|
@ -84,14 +84,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.submitPromise = apiService.organizationUsers.put({ orgId: $state.params.orgId, id: id }, {
|
$scope.submitPromise = apiService.organizationUsers.put(
|
||||||
type: $scope.type,
|
{
|
||||||
collections: collections,
|
orgId: $state.params.orgId,
|
||||||
accessAll: $scope.accessAll
|
id: id
|
||||||
}, function () {
|
}, {
|
||||||
$analytics.eventTrack('Edited User');
|
type: $scope.type,
|
||||||
$uibModalInstance.close();
|
collections: collections,
|
||||||
}).$promise;
|
accessAll: $scope.accessAll
|
||||||
|
}, function () {
|
||||||
|
$analytics.eventTrack('Edited User');
|
||||||
|
$uibModalInstance.close();
|
||||||
|
}).$promise;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.close = function () {
|
$scope.close = function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user