use profile route to update the email

This commit is contained in:
Girish Ramakrishnan
2016-09-28 15:49:41 -07:00
parent 1a4bb4d119
commit 2ea772b862

View File

@@ -89,12 +89,11 @@ angular.module('Application').controller('AccountController', ['$scope', 'Client
$scope.emailchange.error.email = null;
$scope.emailchange.busy = true;
var user = {
id: $scope.user.id,
var data = {
email: $scope.emailchange.email
};
Client.updateUser(user, function (error) {
Client.updateProfile(data, function (error) {
$scope.emailchange.busy = false;
if (error) {