Project-Books / book-project

Book tracker web app for book lovers
https://project-books.github.io/
GNU General Public License v3.0
482 stars 457 forks source link

Sending fake mail #904

Closed gabrielronei closed 2 years ago

gabrielronei commented 2 years ago

Summary of change

I've added @Profile for the implementations of EmailService and called interface on Controller and let spring inject which implementation is available depending on the current profile.

This helps us to remove the if(environment...)

Additional context

Related issue

Closes #891

Pull request checklist

Please keep this checklist in & ensure you have done the following:

For any of the optional checkboxes (e.g. the screenshots one), still check it if it does not apply.

gabrielronei commented 2 years ago

Thanks for working on this.

I've left some preliminary comments for you to address. Could you also please fix the failing tests (the build is failing)?

i've fixed one test that was broken

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell B 12 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication