Settings: Now Updating the user via API call

This commit is contained in:
Sagi Dayan 2015-06-18 23:26:51 +03:00
parent af608da379
commit da224b25d8

View file

@ -35,7 +35,13 @@ angular.module('SeHub')
$scope.profileMode = "Save Profile";
$scope.profileModeIcon = "fa fa-floppy-o";
} else {
dataService.userBrodcast($scope.user);
apiService.updateUser(token, $scope.user).success(function(data){
console.info('User Saved');
dataService.userBrodcast($scope.user);
}).error(function(e){
console.error('Fail To Save User');
});
$scope.profileMode = "Edit Profile";
$scope.profileModeIcon = "fa fa-pencil";
}