feat: improve account management and welcome emails
This commit is contained in:
@@ -19,6 +19,8 @@ const environmentSchema = z.object({
|
||||
INVITATION_TTL_HOURS: z.coerce.number().int().min(1).max(24 * 90).default(24 * 7),
|
||||
PASSWORD_RESET_TTL_HOURS: z.coerce.number().int().min(1).max(24 * 30).default(24),
|
||||
AUDIT_LOG_PAGE_SIZE: z.coerce.number().int().min(10).max(500).default(50),
|
||||
RESEND_API_KEY: optionalEnvironmentValue(z.string().min(20)),
|
||||
EMAIL_FROM: optionalEnvironmentValue(z.string().trim().min(3).max(320)),
|
||||
BUNNY_STREAM_LIBRARY_ID: optionalEnvironmentValue(z.coerce.number().int().positive()),
|
||||
BUNNY_STREAM_API_KEY: optionalEnvironmentValue(z.string().min(20)),
|
||||
BUNNY_EMBED_TOKEN_KEY: optionalEnvironmentValue(z.string().min(20)),
|
||||
@@ -58,3 +60,7 @@ const bunnyStorageConfigurationValues = [
|
||||
if (bunnyStorageConfigurationValues.some(Boolean) && !bunnyStorageConfigurationValues.every(Boolean)) {
|
||||
throw new Error('BUNNY_STORAGE_ZONE, BUNNY_STORAGE_PASSWORD, BUNNY_STORAGE_ENDPOINT, and BUNNY_STORAGE_CDN_HOST must be configured together.');
|
||||
}
|
||||
|
||||
if (Boolean(config.RESEND_API_KEY) !== Boolean(config.EMAIL_FROM)) {
|
||||
throw new Error('RESEND_API_KEY and EMAIL_FROM must be configured together.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user