aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorMert Demir <mertd@users.noreply.github.com>2024-02-01 07:00:19 +0900
committerGitHub <noreply@github.com>2024-01-31 17:00:19 -0500
commit08d75fd75c063bd17d2471b263452b490910338b (patch)
tree8374575ab7ad02327fa3a4fbfa5d04415d3944d6 /src/lib
parente6467b41fccefe1ceb39dd1ed6343290e152be85 (diff)
Support for additional S3 providers (#71)
* support for other s3 providers * remove redundant route options * use type safe env * prettier
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/env.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/env.ts b/src/lib/env.ts
index 33b835d..f1d59db 100644
--- a/src/lib/env.ts
+++ b/src/lib/env.ts
@@ -17,12 +17,14 @@ const envSchema = z
S3_UPLOAD_SECRET: z.string().optional(),
S3_UPLOAD_BUCKET: z.string().optional(),
S3_UPLOAD_REGION: z.string().optional(),
+ S3_UPLOAD_ENDPOINT: z.string().optional(),
NEXT_PUBLIC_ENABLE_RECEIPT_EXTRACT: z.coerce.boolean().default(false),
OPENAI_API_KEY: z.string().optional(),
})
.superRefine((env, ctx) => {
if (
env.NEXT_PUBLIC_ENABLE_EXPENSE_DOCUMENTS &&
+ // S3_UPLOAD_ENDPOINT is fully optional as it will only be used for providers other than AWS
(!env.S3_UPLOAD_BUCKET ||
!env.S3_UPLOAD_KEY ||
!env.S3_UPLOAD_REGION ||