mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	Cover photo removal for groups, #3832
This commit is contained in:
		| @@ -242,4 +242,18 @@ SocketGroups.cover.update = function(socket, data, callback) { | ||||
| 	}); | ||||
| }; | ||||
|  | ||||
| SocketGroups.cover.remove = function(socket, data, callback) { | ||||
| 	if (!socket.uid) { | ||||
| 		return callback(new Error('[[error:no-privileges]]')); | ||||
| 	} | ||||
|  | ||||
| 	groups.ownership.isOwner(socket.uid, data.groupName, function(err, isOwner) { | ||||
| 		if (!isOwner) { | ||||
| 			return callback(new Error('[[error:no-privileges]]')); | ||||
| 		} | ||||
|  | ||||
| 		groups.removeCover(data, callback); | ||||
| 	}); | ||||
| } | ||||
|  | ||||
| module.exports = SocketGroups; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user