Skip to content

Commit

Permalink
move underage consent
Browse files Browse the repository at this point in the history
  • Loading branch information
Hlamallama committed Nov 8, 2023
1 parent bd496cc commit 2701ff2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions go-app-ussd_tb_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 3 additions & 4 deletions src/ussd_tb_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2701ff2

Please sign in to comment.