Added functionality to add songs from another channel

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-21 15:01:14 +01:00
parent 8d14b14c65
commit 859062204c
13 changed files with 230 additions and 34 deletions

View File

@@ -6,7 +6,7 @@ var settings = [];
db.getCollectionNames(function(err, docs) {
for(var i = 0; i < docs.length; i++) {
if(docs[i].indexOf("_settings")) {
if(docs[i].indexOf("_settings") == -1) {
t(docs[i]);
}
}
@@ -26,10 +26,12 @@ db.getCollectionNames(function(err, docs) {
})
function t(docs) {
db.collection(docs).find({id: "config"}, function(e, _docs) {
if(_docs.length > 0 && _docs[0].userpass == undefined) {
console.log(docs);
})
db.collection(docs).find({id: {$exists: true}}, function(e, _docs) {
if(_docs.length > 0) {
db.collection(docs).createIndex({id: 1}, {unique: true}, function(e,d){
console.log(docs);
});
}
})
}

View File

@@ -95,14 +95,12 @@ app.use(function (req, res, next) {
maxAge: 365 * 10000 * 3600000,
httpOnly: true,
secure: secure,
domain: "zoff.me"
});
} else {
res.cookie('_uI', cookie, {
maxAge: 365 * 10000 * 3600000,
httpOnly: true,
secure: secure,
domain: "zoff.me"
});
}
res.header("Access-Control-Allow-Origin", "*");