diff options
| author | Sebastien Castiel <sebastien@castiel.me> | 2024-01-09 15:32:19 -0500 |
|---|---|---|
| committer | Sebastien Castiel <sebastien@castiel.me> | 2024-01-09 15:32:19 -0500 |
| commit | 323b0ea1282abc0945cef1ebf8185bdf9a156f5d (patch) | |
| tree | 5526370fed1acbcb3cc2d43b9b1d0a6264783b47 /src/lib | |
| parent | 5ce96aef30b87a1aeecfac67e99621b06ab64b93 (diff) | |
Feedback button
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/env.ts | 3 | ||||
| -rw-r--r-- | src/lib/resend.ts | 5 |
2 files changed, 8 insertions, 0 deletions
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 |
