add: contactController,tests & refactored tests
This commit is contained in:
@@ -88,7 +88,7 @@ func (uc *UserController) RegisterUser(c *gin.Context) {
|
||||
}
|
||||
|
||||
// Notify admin of new user registration
|
||||
if err := uc.EmailService.NotifyAdminOfNewUser(®Data.User); err != nil {
|
||||
if err := uc.EmailService.SendRegistrationNotification(®Data.User); err != nil {
|
||||
logger.Error.Printf("Failed to notify admin of new user registration: %v", err)
|
||||
// Proceed without returning error since user registration is successful
|
||||
}
|
||||
@@ -112,6 +112,7 @@ func (uc *UserController) VerifyMailHandler(c *gin.Context) {
|
||||
c.HTML(http.StatusUnauthorized, "verification_error.html", gin.H{"ErrorMessage": "Emailadresse wurde schon bestätigt. Sollte dies nicht der Fall sein, wende Dich bitte an info@carsharing-hasloh.de."})
|
||||
return
|
||||
}
|
||||
logger.Info.Printf("User: %#v", user)
|
||||
|
||||
uc.EmailService.SendWelcomeEmail(user)
|
||||
c.HTML(http.StatusOK, "verification_success.html", gin.H{"FirstName": user.FirstName})
|
||||
|
||||
Reference in New Issue
Block a user