mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	feat(topic-events): topic events GET route in write API
This commit is contained in:
		| @@ -181,3 +181,11 @@ async function checkThumbPrivileges({ tid, uid, res }) { | ||||
| 		return helpers.formatApiResponse(403, res, new Error('[[error:no-privileges]]')); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| Topics.getEvents = async (req, res) => { | ||||
| 	if (!await privileges.topics.can('topics:read', req.params.tid, req.uid)) { | ||||
| 		return helpers.formatApiResponse(403, res); | ||||
| 	} | ||||
|  | ||||
| 	helpers.formatApiResponse(200, res, await topics.events.get(req.params.tid)); | ||||
| }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user