updated
This commit is contained in:
@@ -26,7 +26,7 @@ function (angular) {
|
||||
|
||||
});
|
||||
|
||||
module.controller('AccountCtrl', function($scope, $http) {
|
||||
module.controller('AccountCtrl', function($scope, $http, alertSrv) {
|
||||
|
||||
$scope.collaborator = {};
|
||||
|
||||
@@ -35,10 +35,16 @@ function (angular) {
|
||||
return;
|
||||
}
|
||||
|
||||
$http.post('/api/account/collaborators/add', $scope.collaborator).then(function(results) {
|
||||
|
||||
$http.post('/api/account/collaborators/add', $scope.collaborator).then(function() {
|
||||
alertSrv.set('Collaborator added', '', 'success', 3000);
|
||||
}, function(err) {
|
||||
|
||||
if (err.data && err.data.status) {
|
||||
alertSrv.set('Could not add collaborator', err.data.status, 'warning', 10000);
|
||||
}
|
||||
else if (err.statusText) {
|
||||
alertSrv.set('Could not add collaborator', err.data.status, 'warning', 10000);
|
||||
}
|
||||
console.log("value", err);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user