Add Client.getGroups()
This commit is contained in:
@@ -392,6 +392,13 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
|
|||||||
}).error(defaultErrorHandler(callback));
|
}).error(defaultErrorHandler(callback));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Client.prototype.getGroups = function (callback) {
|
||||||
|
$http.get(client.apiOrigin + '/api/v1/groups').success(function (data, status) {
|
||||||
|
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
|
||||||
|
callback(null, data.groups);
|
||||||
|
}).error(defaultErrorHandler(callback));
|
||||||
|
};
|
||||||
|
|
||||||
Client.prototype.getNonApprovedApps = function (callback) {
|
Client.prototype.getNonApprovedApps = function (callback) {
|
||||||
if (!this._config.developerMode) return callback(null, []);
|
if (!this._config.developerMode) return callback(null, []);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user