Add Client.updateProfile

This commit is contained in:
Girish Ramakrishnan
2016-09-28 15:49:33 -07:00
parent 079bf3aed1
commit 1a4bb4d119

View File

@@ -821,6 +821,13 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
}).error(defaultErrorHandler(callback));
};
Client.prototype.updateProfile = function (data, callback) {
post('/api/v1/profile', data).success(function(data, status) {
if (status !== 204) return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
};
Client.prototype.changePassword = function (currentPassword, newPassword, callback) {
var data = {
password: currentPassword,