From 2701ff264cd7c081205703005b265d6e560b435e Mon Sep 17 00:00:00 2001 From: Hlamalani Date: Wed, 8 Nov 2023 14:55:56 +0200 Subject: [PATCH] move underage consent --- go-app-ussd_tb_check.js | 7 +++---- src/ussd_tb_check.js | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) 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)