mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Fixed issue with new lists
This commit is contained in:
@@ -57,7 +57,7 @@ function list(msg, guid, coll, offline, socket) {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
db.createCollection(coll, function(err, docs){
|
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){
|
db.collection(coll + "_settings").insert(configs, function(err, docs){
|
||||||
socket.join(coll);
|
socket.join(coll);
|
||||||
List.send_list(coll, socket, true, false, true);
|
List.send_list(coll, socket, true, false, true);
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ function conf_function(params, coll, guid, offline, socket) {
|
|||||||
} else {
|
} else {
|
||||||
hash = adminpass;
|
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)) {
|
if(docs !== null && docs.length !== 0 && (docs[0].adminpass === "" || docs[0].adminpass == hash)) {
|
||||||
var obj = {
|
var obj = {
|
||||||
addsongs:addsongs,
|
addsongs:addsongs,
|
||||||
|
|||||||
Reference in New Issue
Block a user