Better error-logging

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-09 14:48:46 +01:00
parent 8a3b2113f8
commit 82e643140e
5 changed files with 13 additions and 12 deletions

View File

@@ -12,8 +12,10 @@ function get_history(channel, all, socket, pass) {
}
if(!query.all) {
db.collection(channel + "_settings").find({id: "config"}, function(err, conf) {
if(conf.length > 0 && conf[0].userpass == "" || conf[0].userpass == Functions.decrypt_string(socket.zoff_id, pass)) {
getAndSendLogs(channel, all, socket, pass, query);
if(conf.length > 0) {
if(conf[0].userpass == "" || conf[0].userpass == Functions.decrypt_string(socket.zoff_id, pass)) {
getAndSendLogs(channel, all, socket, pass, query);
}
}
});
} else {