From 785813b842d11e04f0d7c45a3dac92633430add1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Sun, 4 Mar 2018 10:31:46 +0100 Subject: [PATCH] Fixed issue with new lists --- server/handlers/list.js | 2 +- server/handlers/list_settings.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/handlers/list.js b/server/handlers/list.js index 9aea91ce..9b0e22e5 100644 --- a/server/handlers/list.js +++ b/server/handlers/list.js @@ -57,7 +57,7 @@ function list(msg, guid, coll, offline, socket) { }); } else { db.createCollection(coll, function(err, docs){ - var configs = {"addsongs":false, "adminpass":"", "allvideos":true, "frontpage":true, "longsongs":false, "removeplay": false, "shuffle": true, "skip": false, "skips": [], "startTime":Functions.get_time(), "views": [], "vote": false, "desc": "", userpass: ""}; + var configs = {"addsongs":false, "adminpass":"", "allvideos":true, "frontpage":true, "longsongs":false, "removeplay": false, "shuffle": true, "skip": false, "skips": [], "startTime":Functions.get_time(), "views": [], "vote": false, "desc": "", userpass: "", id: "config"}; db.collection(coll + "_settings").insert(configs, function(err, docs){ socket.join(coll); List.send_list(coll, socket, true, false, true); diff --git a/server/handlers/list_settings.js b/server/handlers/list_settings.js index a1af60e7..3b8a0d3c 100644 --- a/server/handlers/list_settings.js +++ b/server/handlers/list_settings.js @@ -117,7 +117,7 @@ function conf_function(params, coll, guid, offline, socket) { } else { hash = adminpass; } - db.collection(coll + "_settings").find(function(err, docs){ + db.collection(coll + "_settings").find({id: "config"}, function(err, docs){ if(docs !== null && docs.length !== 0 && (docs[0].adminpass === "" || docs[0].adminpass == hash)) { var obj = { addsongs:addsongs,