We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa63a5e commit 5bd9b2bCopy full SHA for 5bd9b2b
1 file changed
src/notifications/tickets.ts
@@ -232,4 +232,22 @@ export const sendActualUserTicketQREmails = async ({
232
to,
233
ticketName: userTickets[0].ticketTemplate.name,
234
});
235
+
236
+ const emailLogsValuesToInsert = userTickets.map((someUserTicket) => {
237
+ const next = insertUserTicketsEmailLogSchema.parse({
238
+ emailType: UserTicketsEmailType.TICKET_GIFT_SENT,
239
+ userTicketId: someUserTicket.id,
240
+ userId: someUserTicket.user?.id ?? "",
241
+ });
242
243
+ return next;
244
245
246
+ await DB.insert(userTicketsEmailLogSchema).values(emailLogsValuesToInsert);
247
248
+ logger.info(
249
+ `Sent "TICKET_GIFT_SENT" email to ${userTickets
250
+ .map((t) => t.user?.email)
251
+ .join(", ")}`,
252
+ );
253
};
0 commit comments