Warn the user on group deletion if it still has members

This commit is contained in:
Johannes Zellner
2016-02-13 12:42:38 +01:00
parent 754e33af2a
commit 7c243cb219
3 changed files with 21 additions and 1 deletions

View File

@@ -407,6 +407,13 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
}).error(defaultErrorHandler(callback));
};
Client.prototype.getGroup = function (groupId, callback) {
$http.get(client.apiOrigin + '/api/v1/groups/' + groupId).success(function (data, status) {
if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data));
callback(null, data);
}).error(defaultErrorHandler(callback));
};
Client.prototype.createGroup = function (name, callback) {
var data = {
name: name