mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
more ensurance id is string
This commit is contained in:
@@ -158,6 +158,7 @@ function skip(list, guid, coll, offline, socket) {
|
||||
socket.emit('update_required', result);
|
||||
return;
|
||||
}
|
||||
list.id = list.id + "";
|
||||
Functions.getSessionAdminUser(Functions.getSession(socket), coll, function(userpass, adminpass) {
|
||||
if(adminpass != "" || list.pass == undefined) {
|
||||
list.pass = adminpass;
|
||||
@@ -592,6 +593,8 @@ function end(obj, coll, guid, offline, socket) {
|
||||
socket.emit("update_required", result);
|
||||
return;
|
||||
}
|
||||
obj.id = obj.id + "";
|
||||
id = id + "";
|
||||
var callback_function = function() {
|
||||
for(var i = 0; i < arguments.length; i++) {
|
||||
if(typeof(arguments[i]) == "function") {
|
||||
|
||||
@@ -507,7 +507,7 @@ function add_function(arr, coll, guid, offline, socket) {
|
||||
function voteUndecided(msg, coll, guid, offline, socket) {
|
||||
var socketid = socket.zoff_id;
|
||||
if(typeof(msg) === 'object' && msg !== undefined && msg !== null){
|
||||
|
||||
if(msg.hasOwnProperty("id")) msg.id = msg.id + "";
|
||||
if(!msg.hasOwnProperty("channel") || !msg.hasOwnProperty("id") ||
|
||||
!msg.hasOwnProperty("type") || typeof(msg.channel) != "string" ||
|
||||
typeof(msg.id) != "string" || typeof(msg.type) != "string") {
|
||||
|
||||
Reference in New Issue
Block a user