renamed rconService.getUsers() to rconService.getPlayers() to be consistent

console History rotates correctly up and down
This commit is contained in:
alexfriesen
2016-05-19 18:58:36 +02:00
parent 12c58af9af
commit 90c60f9fa9
4 changed files with 30 additions and 10 deletions
+8 -5
View File
@@ -9,29 +9,32 @@ function PlayerInfoController( $scope, rconService, $routeParams )
$scope.refresh = function ()
{
rconService.getUsers($scope, function(users) {
rconService.getPlayers($scope, function(players) {
for(var i in users) {
if(users[i].SteamID === $scope.userid){
for(var i in players) {
if(players[i].SteamID === $scope.userid){
// set player data
$scope.info = users[i];
$scope.info = players[i];
return;
}
}
// info not found
// player not found
// reset data to null
$scope.info = null;
});
}
$scope.getUsername = function ()
{
// try to find players name in info
if($scope.info && $scope.info.DisplayName) {
return $scope.info.DisplayName;
}
// otherwise show the id
return $scope.userid;
}