Skip to content

Commit

Permalink
Fix subscription email username field
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenWeathers committed Mar 31, 2024
1 parent 772f42c commit ef9dd6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/webhook/subscription/subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (s *Service) HandleWebhook() http.HandlerFunc {
zap.String("eventId", event.ID))
return
}
emailErr := s.emailSvc.SendUserSubscriptionActive(user.Id, user.Email, sub.Type)
emailErr := s.emailSvc.SendUserSubscriptionActive(user.Name, user.Email, sub.Type)
if emailErr != nil {
logger.Error(fmt.Sprintf("error sending subscription active email: %v", emailErr),
zap.String("eventId", event.ID))
Expand Down Expand Up @@ -213,7 +213,7 @@ func (s *Service) HandleWebhook() http.HandlerFunc {
zap.String("eventId", event.ID))
return
}
emailErr := s.emailSvc.SendUserSubscriptionDeactivated(user.Id, user.Email, subscription.Type)
emailErr := s.emailSvc.SendUserSubscriptionDeactivated(user.Name, user.Email, subscription.Type)
if emailErr != nil {
logger.Error(fmt.Sprintf("error sending subscription deactivated email: %v", emailErr),
zap.String("eventId", event.ID))
Expand All @@ -227,7 +227,7 @@ func (s *Service) HandleWebhook() http.HandlerFunc {
zap.String("eventId", event.ID))
return
}
emailErr := s.emailSvc.SendUserSubscriptionActive(user.Id, user.Email, subscription.Type)
emailErr := s.emailSvc.SendUserSubscriptionActive(user.Name, user.Email, subscription.Type)
if emailErr != nil {
logger.Error(fmt.Sprintf("error sending subscription activate email: %v", emailErr),
zap.String("eventId", event.ID))
Expand Down

0 comments on commit ef9dd6e

Please sign in to comment.