aifraenkel / hackcorona_anthillcreations_app

GNU General Public License v3.0
2 stars 1 forks source link

Parse and validate api input #12

Closed aifraenkel closed 4 years ago

aifraenkel commented 4 years ago

The api will receive a http post request with this body:

{ "age_brackets":1, "existing_disorder":0, "smoking_history":0, "country":"Brazil", "state":"Rio de Janeiro", "exposed_to_virus":0, "exposed_to_risk_country":0, "has_fever":0, "has_related_symptoms":1 }'

Every field is mandatory, if one of them is not present in the request body, a 400 error should be sent to the user indicating that some fields were not defined in the message