Added a funny 404 page

This commit is contained in:
Kasper Rynning-Tønnesen
2017-11-14 12:24:09 +01:00
parent 7b0d3c3232
commit 1adff62a45
3 changed files with 14 additions and 7 deletions

View File

@@ -53,9 +53,11 @@ function list(msg, guid, coll, offline, socket) {
socket.emit("auth_required");
}
});
} else{
} else {
db.createCollection(coll, function(err, docs){
db.collection(coll).insert({"addsongs":false, "adminpass":"", "allvideos":true, "frontpage":true, "longsongs":false, "removeplay": false, "shuffle": true, "skip": false, "skips": [], "startTime":Functions.get_time(), "views": [], "vote": false, "desc": ""}, 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": ""};
db.collection(coll).insert(configs, function(err, docs){
socket.join(coll);
List.send_list(coll, socket, true, false, true);
db.collection("frontpage_lists").insert({"_id": coll, "count" : 0, "frontpage": true, "accessed": Functions.get_time()});
});
@@ -361,7 +363,6 @@ function send_list(coll, socket, send, list_send, configs, shuffled)
}
});
if(configs)
{
if(conf[0].adminpass !== "") conf[0].adminpass = true;