mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Forcing int
This commit is contained in:
@@ -8,13 +8,17 @@ function add_function(arr, coll, guid, offline, socket) {
|
||||
return;
|
||||
}
|
||||
|
||||
var start = arr.start;
|
||||
var end = arr.end;
|
||||
try {
|
||||
var start = parseInt(arr.start);
|
||||
var end = parseInt(arr.end);
|
||||
|
||||
if(start >= end) {
|
||||
start = 0;
|
||||
arr.duration = end - start;
|
||||
}
|
||||
} catch(e) {
|
||||
return;
|
||||
}
|
||||
|
||||
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)))) {
|
||||
|
||||
Reference in New Issue
Block a user