- ✅ Receives a request of type PUT in the route /api/surveys/{survey_id}/results
- ✅ Validates if the request was made by a user
- ✅ Validate the survey_id parameter
- ✅ Validates if the answer field is a valid answer
- ✅ Creates a poll result with the data provided if you do not have a record
- ✅ Updates a poll result with the data provided if you already have a record
- ✅ Returns 200 with poll result data
- ✅ Return 404 error if API does not exist
- ✅ Returns 403 error if not a user
- ✅ Returns 403 error if survey_id passed in URL is invalid
- ✅ Returns 403 error if the response sent by the client is an invalid response
- ✅ Returns 500 error if there is an error when trying to create the poll result
- ✅ Returns 500 error if there is an error when trying to update the poll result
- ✅ Returns 500 error if there is an error when trying to load the poll