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