diff --git a/go-app-ussd_tb_check.js b/go-app-ussd_tb_check.js index 2584bf27..ad5fcc6d 100644 --- a/go-app-ussd_tb_check.js +++ b/go-app-ussd_tb_check.js @@ -1016,15 +1016,14 @@ go.app = function () { } else{ payload.data.follow_up_optin = answers.state_opt_in; - - if (answers.state_age === "<18"){ - payload.data.research_consent = false; - } } if(self.im.user.answers.state_age !== "<18") { payload.data.city_location = answers.city_location; } + else{ + payload.data.research_consent = false; + } return new JsonApi(self.im) .post(self.im.config.healthcheck.url + "/v2/tbcheck/", payload) diff --git a/src/ussd_tb_check.js b/src/ussd_tb_check.js index 3cd4707a..6f86b7a8 100644 --- a/src/ussd_tb_check.js +++ b/src/ussd_tb_check.js @@ -899,15 +899,14 @@ go.app = function () { } else{ payload.data.follow_up_optin = answers.state_opt_in; - - if (answers.state_age === "<18"){ - payload.data.research_consent = false; - } } if(self.im.user.answers.state_age !== "<18") { payload.data.city_location = answers.city_location; } + else{ + payload.data.research_consent = false; + } return new JsonApi(self.im) .post(self.im.config.healthcheck.url + "/v2/tbcheck/", payload)