Commit 961ebbde by Torkel Ödegaard

Working on account collaborators

parent 733a9af6
...@@ -31,16 +31,15 @@ function (angular) { ...@@ -31,16 +31,15 @@ function (angular) {
$scope.setUsingAccount = function(otherAccount) { $scope.setUsingAccount = function(otherAccount) {
backendSrv.request({ backendSrv.request({
method: 'POST', method: 'POST',
url: '/api/account/using/' + otherAccount.id, url: '/api/account/using/' + otherAccount.accountId,
desc: 'Change active account', desc: 'Change active account',
}).then($scope.getOtherAccounts); }).then($scope.getOtherAccounts);
}; };
$scope.removeCollaborator = function(collaborator) { $scope.removeCollaborator = function(collaborator) {
backendSrv.request({ backendSrv.request({
method: 'POST', method: 'DELETE',
url: '/api/account/collaborators/remove', url: '/api/account/collaborators/' + collaborator.id,
data: { accountId: collaborator.accountId },
desc: 'Remove collaborator', desc: 'Remove collaborator',
}).then($scope.getAccount); }).then($scope.getAccount);
}; };
...@@ -51,8 +50,8 @@ function (angular) { ...@@ -51,8 +50,8 @@ function (angular) {
} }
backendSrv.request({ backendSrv.request({
method: 'POST', method: 'PUT',
url: '/api/account/collaborators/add', url: '/api/account/collaborators',
data: $scope.collaborator, data: $scope.collaborator,
desc: 'Add collaborator' desc: 'Add collaborator'
}).then($scope.getAccount); }).then($scope.getAccount);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment