mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	closes #2477
This commit is contained in:
		| @@ -4,11 +4,11 @@ var nconf = require('nconf'); | ||||
|  | ||||
| var helpers = {}; | ||||
|  | ||||
| helpers.notFound = function(res) { | ||||
| helpers.notFound = function(req, res, error) { | ||||
| 	if (res.locals.isAPI) { | ||||
| 		res.status(404).json('not-found'); | ||||
| 		res.status(404).json({path: req.path.replace(/^\/api/, ''), error: error}); | ||||
| 	} else { | ||||
| 		res.status(404).render('404'); | ||||
| 		res.status(404).render('404', {path: req.path, error: error}); | ||||
| 	} | ||||
| }; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user