mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	Fixed issue where userpass not existing
This commit is contained in:
		| @@ -9,6 +9,7 @@ num_processes = require('os').cpus().length; | ||||
| publicPath = path.join(__dirname, 'public'); | ||||
| pathThumbnails = __dirname; | ||||
|  | ||||
|  | ||||
| try { | ||||
|     var redis = require("redis"); | ||||
|     var client = redis.createClient({host: "localhost", port: 6379}); | ||||
|   | ||||
| @@ -181,6 +181,7 @@ function get_list_ajax() { | ||||
|             } | ||||
|         }, | ||||
|         error: function(response) { | ||||
|             console.log(response); | ||||
|             if(response.responseJSON.status == 403) { | ||||
|                 start_auth(); | ||||
|             } else if(response.responseJSON.status == 429) { | ||||
|   | ||||
| @@ -561,7 +561,7 @@ router.route('/api/list/:channel_name/__np__').post(function(req, res) { | ||||
|                                 if(conf.length == 0) { | ||||
|                                     res.status(404).send(JSON.stringify(error.not_found.list)); | ||||
|                                     return; | ||||
|                                 } else if(conf[0].userpass != userpass && conf[0].userpass != "") { | ||||
|                                 } else if(conf[0].userpass != userpass && conf[0].userpass != "" && conf[0].userpass != undefined) { | ||||
|                                     res.status(403).send(JSON.stringify(error.not_authenticated)); | ||||
|                                     return; | ||||
|                                 } | ||||
| @@ -1020,7 +1020,7 @@ router.route('/api/list/:channel_name').post(function(req, res) { | ||||
|                                 if(conf.length == 0) { | ||||
|                                     res.status(404).send(JSON.stringify(error.not_found.list)); | ||||
|                                     return; | ||||
|                                 } else if(conf[0].userpass != userpass && conf[0].userpass != "") { | ||||
|                                 } else if(conf[0].userpass != userpass && conf[0].userpass != "" && conf[0].userpass != undefined) { | ||||
|                                     res.status(403).send(JSON.stringify(error.not_authenticated)); | ||||
|                                     return; | ||||
|                                 } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user