mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Trying to enable cors for api
This commit is contained in:
@@ -5,6 +5,11 @@ var usual = [];
|
||||
var settings = [];
|
||||
|
||||
db.getCollectionNames(function(err, docs) {
|
||||
for(var i = 0; i < docs.length; i++) {
|
||||
if(docs[i].indexOf("_settings")) {
|
||||
t(docs[i]);
|
||||
}
|
||||
}
|
||||
/*for(var i = 0; i < docs.length; i++) {
|
||||
if(docs[i].indexOf("_settings") > -1) {
|
||||
settings.push(docs[0]);
|
||||
@@ -20,6 +25,14 @@ 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);
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function addType(name) {
|
||||
if(name.indexOf("_settings") > -1) {
|
||||
db.collection(name).update({views: {$exists: true}}, {$set: { id: "config" }}, {multi: true}, function(err, doc) {
|
||||
|
||||
Reference in New Issue
Block a user