mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-02 16:09:08 +02:00
♻️ Improve email abstraction (#861)
This commit is contained in:
parent
9e453da1dd
commit
93cc5b9b4d
10 changed files with 749 additions and 152 deletions
|
@ -1,9 +1,9 @@
|
|||
import { prisma } from "@rallly/database";
|
||||
import { sendEmail } from "@rallly/emails";
|
||||
import { absoluteUrl } from "@rallly/utils";
|
||||
import { z } from "zod";
|
||||
|
||||
import { createToken } from "../../../session";
|
||||
import { emailClient } from "../../../utils/email-client";
|
||||
import { publicProcedure, router } from "../../trpc";
|
||||
import { DisableNotificationsPayload } from "../../types";
|
||||
|
||||
|
@ -82,7 +82,7 @@ export const comments = router({
|
|||
{ ttl: 0 },
|
||||
);
|
||||
emailsToSend.push(
|
||||
sendEmail("NewCommentEmail", {
|
||||
emailClient.sendTemplate("NewCommentEmail", {
|
||||
to: email,
|
||||
subject: `${authorName} has commented on ${poll.title}`,
|
||||
props: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue