AUBGTheHUB / monolith

The Hub AUBG's mono repo
MIT License
9 stars 4 forks source link

662 Implements sending successful registration messages to participants #669

Closed Isak-Bego closed 8 months ago

Isak-Bego commented 8 months ago

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: