use smtp user if no no-reply set

This commit is contained in:
Milo Schwartz 2025-01-28 21:26:34 -05:00
parent a57f0ab360
commit 60110350aa
No known key found for this signature in database
6 changed files with 13 additions and 7 deletions

View file

@ -41,7 +41,7 @@ const configSchema = z.object({
.transform((url) => url.toLowerCase()),
log_level: z.enum(["debug", "info", "warn", "error"]),
save_logs: z.boolean(),
log_failed_attempts: z.boolean().optional(),
log_failed_attempts: z.boolean().optional()
}),
server: z.object({
external_port: portSchema
@ -128,7 +128,7 @@ const configSchema = z.object({
smtp_user: z.string().optional(),
smtp_pass: z.string().optional(),
smtp_secure: z.boolean().optional(),
no_reply: z.string().email()
no_reply: z.string().email().optional()
})
.optional(),
users: z.object({
@ -280,6 +280,12 @@ export class Config {
return this.rawConfig.app.base_domain;
}
public getNoReplyEmail(): string | undefined {
return (
this.rawConfig.email?.no_reply || this.rawConfig.email?.smtp_user
);
}
private createTraefikConfig() {
try {
// check if traefik_config.yml and dynamic_config.yml exists in APP_PATH/traefik