mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 19:15:58 +01:00 
			
		
		
		
	refactor: async/await, remove dupe code for homepage routes
This commit is contained in:
		| @@ -1,14 +1,14 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| const validator = require('validator'); | ||||
| var plugins = require('../../plugins'); | ||||
| const plugins = require('../../plugins'); | ||||
|  | ||||
| var hooksController = module.exports; | ||||
| const hooksController = module.exports; | ||||
|  | ||||
| hooksController.get = function (req, res) { | ||||
| 	var hooks = []; | ||||
| 	const hooks = []; | ||||
| 	Object.keys(plugins.loadedHooks).forEach(function (key, hookIndex) { | ||||
| 		var current = { | ||||
| 		const current = { | ||||
| 			hookName: key, | ||||
| 			methods: [], | ||||
| 			index: 'hook-' + hookIndex, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user