From 8b77717f2b0c7caa2fbc2723d93bec4af56df9df Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Sun, 19 Jun 2016 02:55:24 +0000 Subject: [PATCH] fix leagueid prop name --- config.js | 1 - store/queries.js | 15 +++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/config.js b/config.js index 0ee61c505..beccd9af9 100644 --- a/config.js +++ b/config.js @@ -54,7 +54,6 @@ var defaults = { "UI_HOST": "", //The host of the UI, redirect traffic from / and /return here "ENABLE_RECAPTCHA": "", //set to enable the recaptcha on the Request page "ENABLE_ADS": "", //set to turn on ads - "ENABLE_PRO_PARSING": "", // set to parse pro matches from sequential API "ENABLE_MATCH_CACHE": "", // set to enable caching matches (Redis) "ENABLE_PLAYER_CACHE": "", // set to enable caching players (Cassandra) "ENABLE_INSERT_ALL_MATCHES": "", //set to enable inserting all matches diff --git a/store/queries.js b/store/queries.js index 50544476f..189535a2b 100644 --- a/store/queries.js +++ b/store/queries.js @@ -209,11 +209,18 @@ function insertMatch(db, redis, match, options, cb) function isProMatch(cb) { - redis.sismember('pro_leagueids', match.league_id, function(err, result) + if (match.leagueid) { - match.isProMatch = Boolean(Number(result)); - cb(err); - }); + redis.sismember('pro_leagueids', match.leagueid, function(err, result) + { + match.isProMatch = Boolean(Number(result)); + cb(err); + }); + } + else + { + cb(); + } } function upsertMatch(cb)