Updating channel to fetch prettier

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-12 19:17:01 +01:00
parent 1d7331cb86
commit 3f0f8eb5d9
14 changed files with 196 additions and 57 deletions

View File

@@ -167,6 +167,9 @@ function conf_function(params, coll, guid, offline, socket) {
} else {
hash = adminpass;
}
if(userpass != "") {
userpass = crypto.createHash('sha256').update(userpass).digest("base64");
}
db.collection(coll + "_settings").find({id: "config"}, function(err, docs){
if(docs !== null && docs.length !== 0 && (docs[0].adminpass === "" || docs[0].adminpass == hash)) {
var obj = {