Fetch tokens for each client separately

This commit is contained in:
Johannes Zellner
2016-06-07 12:37:04 +02:00
parent f3436a99a2
commit 4147455654
2 changed files with 15 additions and 0 deletions

View File

@@ -231,6 +231,14 @@ angular.module('Application').controller('AccountController', ['$scope', '$locat
if (error) return console.error(error);
$scope.activeClients = activeClients;
$scope.activeClients.forEach(function (client) {
Client.getTokensByClientId(client.id, function (error, result) {
if (error) console.error(error);
client.activeTokens = result || [];
});
});
});
}