From d8bae1142b83e989b832a579e0991ab045471126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Mon, 5 Jun 2017 10:43:56 +0200 Subject: [PATCH] Fixed delete all button --- server/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/server.js b/server/server.js index 8b574b42..03881b24 100755 --- a/server/server.js +++ b/server/server.js @@ -698,7 +698,7 @@ io.on('connection', function(socket){ db.collection(coll).find({views: {$exists: true}}, function(err, conf) { if(conf.length == 1 && conf) { conf = conf[0]; - if(conf.adminpass == hash && conf.adminpass != "" && ((conf.userpass != "" || (conf.userpass == hash_userpass)))) { + if(conf.adminpass == hash && conf.adminpass != "" && (conf.userpass == "" || (conf.userpass != "" && conf.userpass == hash_userpass))) { db.collection(coll).remove({views: {$exists: false}}, {multi: true}, function(err, succ) { send_list(coll, false, true, true, true); socket.emit("toast", "deleted_songs");