Settings: Now Updating the user via API call
This commit is contained in:
parent
af608da379
commit
da224b25d8
1 changed files with 7 additions and 1 deletions
|
@ -35,7 +35,13 @@ angular.module('SeHub')
|
||||||
$scope.profileMode = "Save Profile";
|
$scope.profileMode = "Save Profile";
|
||||||
$scope.profileModeIcon = "fa fa-floppy-o";
|
$scope.profileModeIcon = "fa fa-floppy-o";
|
||||||
} else {
|
} else {
|
||||||
|
apiService.updateUser(token, $scope.user).success(function(data){
|
||||||
|
console.info('User Saved');
|
||||||
dataService.userBrodcast($scope.user);
|
dataService.userBrodcast($scope.user);
|
||||||
|
|
||||||
|
}).error(function(e){
|
||||||
|
console.error('Fail To Save User');
|
||||||
|
});
|
||||||
$scope.profileMode = "Edit Profile";
|
$scope.profileMode = "Edit Profile";
|
||||||
$scope.profileModeIcon = "fa fa-pencil";
|
$scope.profileModeIcon = "fa fa-pencil";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue