diff --git a/app/js/services/rpc.js b/app/js/services/rpc.js index 36b83c5..0f0fc17 100644 --- a/app/js/services/rpc.js +++ b/app/js/services/rpc.js @@ -36,7 +36,7 @@ angular.module('EiskaltRPC', []).factory('EiskaltRPC', function($http) { }; return promise; } - + return { StopDaemon: function() { return jsonrpc('daemon.stop'); @@ -164,7 +164,17 @@ angular.module('EiskaltRPC', []).factory('EiskaltRPC', function($http) { return jsonrpc('hub.getusers', {huburl: huburl, separator: '#'}, true); }, GetUserInfo: function(nick, huburl) { - return jsonrpc('hub.getuserinfo', {nick: nick, huburl: huburl}); + var promise = jsonrpc('hub.getuserinfo', {nick: nick, huburl: huburl}); + promise.success = function(fn) { + promise.then(function(response) { + var info = response.data.result; + // remove space in key "Nick Order" + info['NickOrder'] = info['Nick Order']; + delete info['Nick Order']; + fn(info); + }); + }; + return promise; }, ShowLocalLists: function() { return jsonrpc('list.local', {separator: '#'}, true); @@ -223,4 +233,4 @@ angular.module('EiskaltRPC', []).factory('EiskaltRPC', function($http) { return jsonrpc('queue.getiteminfo'); } }; -}); \ No newline at end of file +}); diff --git a/app/partials/hubs.html b/app/partials/hubs.html index c1f6c4c..42ea100 100644 --- a/app/partials/hubs.html +++ b/app/partials/hubs.html @@ -13,7 +13,7 @@