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,