mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	feat: closes #9684, allow event deletion
fix: topic events appearing before necro messages feat: add move topic event feat: add ability to delete specific topic events via events.purge
This commit is contained in:
		| @@ -211,3 +211,11 @@ Topics.getEvents = async (req, res) => { | ||||
|  | ||||
| 	helpers.formatApiResponse(200, res, await topics.events.get(req.params.tid)); | ||||
| }; | ||||
|  | ||||
| Topics.deleteEvent = async (req, res) => { | ||||
| 	if (!await privileges.topics.isAdminOrMod(req.params.tid, req.uid)) { | ||||
| 		return helpers.formatApiResponse(403, res); | ||||
| 	} | ||||
| 	await topics.events.purge(req.params.tid, [req.params.eventId]); | ||||
| 	helpers.formatApiResponse(200, res); | ||||
| }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user