From 323b0ea1282abc0945cef1ebf8185bdf9a156f5d Mon Sep 17 00:00:00 2001 From: Sebastien Castiel Date: Tue, 9 Jan 2024 15:32:19 -0500 Subject: Feedback button --- src/lib/env.ts | 3 +++ src/lib/resend.ts | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 src/lib/resend.ts (limited to 'src/lib') diff --git a/src/lib/env.ts b/src/lib/env.ts index 89648eb..ddaa553 100644 --- a/src/lib/env.ts +++ b/src/lib/env.ts @@ -5,6 +5,9 @@ const envSchema = z.object({ POSTGRES_URL_NON_POOLING: z.string().url(), POSTGRES_PRISMA_URL: z.string().url(), PLAUSIBLE_DOMAIN: z.string().optional(), + FEEDBACK_EMAIL_FROM: z.string().email().optional(), + FEEDBACK_EMAIL_TO: z.string().email().optional(), + RESEND_API_KEY: z.string().optional(), }) export const env = envSchema.parse(process.env) diff --git a/src/lib/resend.ts b/src/lib/resend.ts new file mode 100644 index 0000000..48c5fb7 --- /dev/null +++ b/src/lib/resend.ts @@ -0,0 +1,5 @@ +import { env } from '@/lib/env' +import { Resend } from 'resend' + +export const getResend = () => + env.RESEND_API_KEY ? new Resend(env.RESEND_API_KEY) : null -- cgit v1.3