Implemented sending a successful registration message to the participants:
I added a background task in the verification controller to send an email to the verified random participant and modified the message sent to the admin of a normal team to also include a successful registration message. Furthermore, for the participants who are registered by link, the logic for sending the email is implemented in the participant's controller in the method named add_participant_to_existing_team(), because they are verified by default and they dont use the verify endpoint. I also changed some confusing logic about how the check for the capacity reach was made in the add_participant method to something that I think is more clear and correct. The previous version wasn't letting you add a participant to an existing team when the number of teams had reached the cap. This was because it had a check in the beginning of the file which returned a json response when the cap was reached with causing issues to the logic of the code.
Lastly, I changed the method get_count_of_teams to only count the verified teams in the database.
resolves #662
How to verify:
[ ] Start the backend
[ ] Register as a participant with a team, as a random participant and as a participant with invitation link.
Implemented sending a successful registration message to the participants:
I added a background task in the verification controller to send an email to the verified random participant and modified the message sent to the admin of a normal team to also include a successful registration message. Furthermore, for the participants who are registered by link, the logic for sending the email is implemented in the participant's controller in the method named add_participant_to_existing_team(), because they are verified by default and they dont use the verify endpoint. I also changed some confusing logic about how the check for the capacity reach was made in the add_participant method to something that I think is more clear and correct. The previous version wasn't letting you add a participant to an existing team when the number of teams had reached the cap. This was because it had a check in the beginning of the file which returned a json response when the cap was reached with causing issues to the logic of the code. Lastly, I changed the method get_count_of_teams to only count the verified teams in the database.
resolves #662
How to verify:
[ ] Start the backend
[ ] Register as a participant with a team, as a random participant and as a participant with invitation link.
[ ] Check the emails that you have received.