added colorpicker to frontend, badge colour changes for groups, #2588

This commit is contained in:
Julian Lam
2015-01-09 13:51:27 -05:00
parent 7be0830751
commit b4731ad47b
8 changed files with 102 additions and 17 deletions

View File

@@ -87,4 +87,18 @@ SocketGroups.reject = function(socket, data, callback) {
});
};
SocketGroups.update = function(socket, data, callback) {
if(!data) {
return callback(new Error('[[error:invalid-data]]'));
}
groups.ownership.isOwner(socket.uid, data.groupName, function(err, isOwner) {
if (!isOwner) {
return callback(new Error('[[error:no-privileges]]'));
}
groups.update(data.groupName, data.values, callback);
});
};
module.exports = SocketGroups;