hngprojects / hng_boilerplate_python_fastapi_web

Apache License 2.0
155 stars 136 forks source link

fix: Fixed sending of emails to only new newsletter-subscribers. #970

Closed johnson-oragui closed 2 months ago

johnson-oragui commented 2 months ago

Summary

This pull request fixes the constant ending of emails to users and visitors that subscribes to newsletters.

Description

This pull request fixes the constant ending of emails to users and visitors that subscribes to newsletters. With this fix, only newsletter subscribers that are subscribing for the first time would receive a notification email.

Related Issue (Link to issue ticket)

newsletter fix

Motivation and Context

How Has This Been Tested?

This has been tested with postman. The pytest for this already exists.

Screenshots (if appropriate - Postman, etc):

USER SUBSCRIBE FOR THE FIRST TIME bugfix newsletter subscribe

​USER TRIES TO SUBSCRIBE AGAIN bugfix newsletter already subscribed

Types of changes

Checklist: