mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Updated so start can't be after end
This commit is contained in:
@@ -11,6 +11,11 @@ function add_function(arr, coll, guid, offline, socket) {
|
|||||||
var start = arr.start;
|
var start = arr.start;
|
||||||
var end = arr.end;
|
var end = arr.end;
|
||||||
|
|
||||||
|
if(start >= end) {
|
||||||
|
start = 0;
|
||||||
|
arr.duration = end - start;
|
||||||
|
}
|
||||||
|
|
||||||
db.collection(coll + "_settings").find(function(err, docs){
|
db.collection(coll + "_settings").find(function(err, docs){
|
||||||
if(docs.length > 0 && (docs[0].userpass == undefined || docs[0].userpass == "" || (arr.hasOwnProperty('pass') && docs[0].userpass == Functions.decrypt_string(socketid, arr.pass)))) {
|
if(docs.length > 0 && (docs[0].userpass == undefined || docs[0].userpass == "" || (arr.hasOwnProperty('pass') && docs[0].userpass == Functions.decrypt_string(socketid, arr.pass)))) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user