Add NoOp email service, /docs shortcut and fix streak timezone bug
Replace nil email service pattern with NoOpEmailService (Null Object) to eliminate nil pointer panics across all handlers. Add /docs route as a shortcut to Swagger UI. Fix streak calculation returning 0 when server timezone differs from UTC — CreatedAt was not converted to UTC before date extraction.
This commit is contained in:
@@ -107,6 +107,10 @@ func (s *SMTPService) GetConfig() SMTPConfig {
|
||||
return s.config
|
||||
}
|
||||
|
||||
func (s *SMTPService) IsEnabled() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (s *SMTPService) HealthCheck() error {
|
||||
dialer := mail.NewDialer(s.config.Host, s.config.Port, s.config.Username, s.config.Password)
|
||||
dialer.TLSConfig = &tls.Config{
|
||||
|
||||
Reference in New Issue
Block a user