Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/api/internal/api/handlers/bat.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (h *BatHandler) SendWelcomeEmails(w http.ResponseWriter, r *http.Request) {

err = h.BatService.SendWelcomeEmailToAttendees(r.Context(), eventId)
if err != nil {
res.SendError(w, http.StatusInternalServerError, res.NewError("internal_err", "Failed to create ScheduleWaitlistTransition task."))
res.SendError(w, http.StatusInternalServerError, res.NewError("internal_err", "Failed to send welcome emails."))
}

res.Send(w, http.StatusCreated, nil)
Expand Down
2 changes: 1 addition & 1 deletion apps/api/internal/email/templates/WelcomeEmail.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h3 style="margin:10px 0; font-size:18px; color:#1a1a1a;">Check-in & Day Of</h3>
that we don’t give your spot away to those in the in-person waitlist. At check-in, you will present
your check-in QR code found below and receive the badge you will use to guarantee you access to venue,
food, and events. The QR code can also be found in the <a href="https://app.swamphacks.com/"
style="color:#1155cc; text-decoration:underline;">portal.</a></li>
style="color:#1155cc; text-decoration:underline;">portal</a>.</li>

<div style="text-align:center; margin:20px 0;">
<div
Expand Down
7 changes: 6 additions & 1 deletion apps/api/internal/services/bat.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,12 @@ func (s *BatService) SendWelcomeEmailToAttendees(ctx context.Context, eventId uu
}
contactEmail, ok := contactInfo.ContactEmail.(string)
if !ok {
return ErrFailedToGetContactEmail
s.logger.Err(err).Msgf("could got convert id %s", userId)
continue
}
if contactEmail == "" {
s.logger.Err(err).Msgf("empty contact email found for user with id %s", userId)
continue
}

err = s.emailService.QueueWelcomeEmail(ctx, contactEmail, contactInfo.Name, userId)
Expand Down