mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed issue with new lists
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user