mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-31 16:14:46 +02:00
added axios client
This commit is contained in:
parent
3c69acaab7
commit
29777da430
7 changed files with 81 additions and 41 deletions
|
@ -43,7 +43,17 @@ const environmentSchema = z.object({
|
|||
.pipe(z.number().optional()),
|
||||
EMAIL_SMTP_USER: z.string().optional(),
|
||||
EMAIL_SMTP_PASS: z.string().optional(),
|
||||
EMAIL_NOREPLY: z.string().optional(),
|
||||
EMAIL_NOREPLY: z.string().email().optional(),
|
||||
SITE_DOMAIN: z
|
||||
.string()
|
||||
.optional()
|
||||
.transform((val) => {
|
||||
if (!val) {
|
||||
return `http://localhost:${environment.EXTERNAL_PORT}`;
|
||||
}
|
||||
return val;
|
||||
})
|
||||
.pipe(z.string().url()),
|
||||
});
|
||||
|
||||
const environment = {
|
||||
|
@ -63,6 +73,7 @@ const environment = {
|
|||
EMAIL_SMTP_USER: process.env.EMAIL_SMTP_USER as string,
|
||||
EMAIL_SMTP_PASS: process.env.EMAIL_SMTP_PASS as string,
|
||||
EMAIL_NOREPLY: process.env.EMAIL_NOREPLY as string,
|
||||
SITE_DOMAIN: process.env.NEXT_PUBLIC_SITE_DOMAIN as string,
|
||||
};
|
||||
|
||||
const parsedConfig = environmentSchema.safeParse(environment);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue