mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added functionality to add songs from another channel
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -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", "*");
|
||||
|
||||
Reference in New Issue
Block a user