Merge branch 'bugfix/showscore' into 'develop'
show_match_value now setted through env See merge request tjohn/cc-data!22
This commit is contained in:
commit
5d2f64a688
@ -5,4 +5,5 @@ DB_USER=root
|
||||
DB_PASSWORD=devtest
|
||||
DB_PORT=3306
|
||||
DATABASE=travopti
|
||||
GOOGLE_CLOUD_APIS=AIzaSyCeMBLfpqTp0IVB7Xipx6ekRQFUBjPacQc
|
||||
GOOGLE_CLOUD_APIS=AIzaSyCeMBLfpqTp0IVB7Xipx6ekRQFUBjPacQc
|
||||
SHOW_MATCH_VALUE=1
|
||||
@ -58,8 +58,8 @@ function searchHandler(dbConn) {
|
||||
//response.data = searchResults
|
||||
const cutScores = !(_.isEmpty(scoreQueryObj.climate) && _.isEmpty(scoreQueryObj.costs) && _.isEmpty(scoreQueryObj.others))
|
||||
|
||||
// TODO only dev:
|
||||
searchResults.forEach(reg => reg.name = `${reg.name} (${_.round(reg.score * 10, 1)}% match)`)
|
||||
// only dev:
|
||||
if (process.env.SHOW_MATCH_VALUE === '1') searchResults.forEach(reg => reg.name = `${reg.name} (${_.round(reg.score * 10, 1)}% match)`)
|
||||
|
||||
// FILTER NULLSCORES
|
||||
if (!_.get(q, 'showRegionsWithNullScore', false)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user