mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 19:15:58 +01:00 
			
		
		
		
	fix: update post-queue hook names
This commit is contained in:
		| @@ -216,6 +216,11 @@ modsController.postQueue = async function (req, res, next) { | |||||||
| 	let postData = await getQueuedPosts(ids); | 	let postData = await getQueuedPosts(ids); | ||||||
| 	postData = postData.filter(p => p && (isAdminOrGlobalMod || moderatedCids.includes(String(p.category.cid)))); | 	postData = postData.filter(p => p && (isAdminOrGlobalMod || moderatedCids.includes(String(p.category.cid)))); | ||||||
|  |  | ||||||
|  | 	({ posts: postData } = await plugins.fireHook('filter:post-queue.get', { | ||||||
|  | 		posts: postData, | ||||||
|  | 		req: req, | ||||||
|  | 	})); | ||||||
|  |  | ||||||
| 	const pageCount = Math.max(1, Math.ceil(postData.length / postsPerPage)); | 	const pageCount = Math.max(1, Math.ceil(postData.length / postsPerPage)); | ||||||
| 	const start = (page - 1) * postsPerPage; | 	const start = (page - 1) * postsPerPage; | ||||||
| 	const stop = start + postsPerPage - 1; | 	const stop = start + postsPerPage - 1; | ||||||
|   | |||||||
| @@ -57,7 +57,7 @@ module.exports = function (Posts) { | |||||||
| 			type: type, | 			type: type, | ||||||
| 			data: data, | 			data: data, | ||||||
| 		}; | 		}; | ||||||
| 		payload = await plugins.fireHook('filter:post.queue', payload); | 		payload = await plugins.fireHook('filter:post-queue.save', payload); | ||||||
| 		payload.data = JSON.stringify(data); | 		payload.data = JSON.stringify(data); | ||||||
|  |  | ||||||
| 		await db.sortedSetAdd('post:queue', now, id); | 		await db.sortedSetAdd('post:queue', now, id); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user