remove user/ from profile route

This commit is contained in:
Girish Ramakrishnan
2018-05-13 21:51:13 -07:00
parent 9275c4fbfd
commit 26087e1580

View File

@@ -281,7 +281,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
};
Client.prototype.userInfo = function (callback) {
get('/api/v1/user/profile').success(function(data, status) {
get('/api/v1/profile').success(function(data, status) {
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
@@ -932,7 +932,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
};
Client.prototype.updateProfile = function (data, callback) {
post('/api/v1/user/profile', data).success(function(data, status) {
post('/api/v1/profile', data).success(function(data, status) {
if (status !== 204) return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
@@ -944,7 +944,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
newPassword: newPassword
};
post('/api/v1/user/profile/password', data).success(function(data, status) {
post('/api/v1/profile/password', data).success(function(data, status) {
if (status !== 204) return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
@@ -953,7 +953,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
Client.prototype.setTwoFactorAuthenticationSecret = function (callback) {
var data = {};
post('/api/v1/user/profile/twofactorauthentication', data).success(function(data, status) {
post('/api/v1/profile/twofactorauthentication', data).success(function(data, status) {
if (status !== 201) return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
@@ -964,7 +964,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
totpToken: totpToken
};
post('/api/v1/user/profile/twofactorauthentication/enable', data).success(function(data, status) {
post('/api/v1/profile/twofactorauthentication/enable', data).success(function(data, status) {
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));
@@ -975,7 +975,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
password: password
};
post('/api/v1/user/profile/twofactorauthentication/disable', data).success(function(data, status) {
post('/api/v1/profile/twofactorauthentication/disable', data).success(function(data, status) {
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
}).error(defaultErrorHandler(callback));