List all oauth clients in webadmin

This commit is contained in:
Johannes Zellner
2016-06-07 12:26:14 +02:00
parent 684625fbaf
commit 70d569e2e8
2 changed files with 24 additions and 26 deletions

View File

@@ -522,8 +522,8 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
}).error(defaultErrorHandler(callback));
};
Client.prototype.getOAuthClients = function (callback) {
$http.get(client.apiOrigin + '/api/v1/oauth/clients').success(function(data, status) {
Client.prototype.getOAuthClients = function (all, callback) {
$http.get(client.apiOrigin + '/api/v1/oauth/clients' + (all ? '?all' : '')).success(function(data, status) {
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
callback(null, data.clients);
}).error(defaultErrorHandler(callback));