mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added a own aggregates file
- Aggregate and project missing fields - Updated how channels are created, to add the new fields
This commit is contained in:
@@ -230,7 +230,16 @@ function conf_function(params, coll, guid, offline, socket) {
|
||||
$set:obj
|
||||
}, function(err, docs){
|
||||
Functions.setSessionUserPass(Functions.getSession(socket), obj["userpass"], coll, function() {
|
||||
db.collection(coll + "_settings").find(function(err, docs){
|
||||
db.collection(coll + "_settings").aggregate([
|
||||
{
|
||||
"$match": {
|
||||
id: "config"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$project": projects.toShowConfig
|
||||
},
|
||||
], function(err, docs){
|
||||
if(docs[0].adminpass !== "") docs[0].adminpass = true;
|
||||
if(docs[0].hasOwnProperty("userpass") && docs[0].userpass != "") docs[0].userpass = true;
|
||||
else docs[0].userpass = false;
|
||||
|
||||
Reference in New Issue
Block a user