mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 02:25:55 +01:00
added colorpicker to frontend, badge colour changes for groups, #2588
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user