Docker 런타임 환경 변수 우선 적용
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { createError } from 'h3'
|
||||
import { getRuntimeEnvValue } from './runtime-env'
|
||||
|
||||
/**
|
||||
* Resend가 서버 설정으로 사용 가능한지
|
||||
@@ -6,8 +7,8 @@ import { createError } from 'h3'
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export const isResendConfigured = (config) => {
|
||||
const key = String(config?.resendApiKey || '').trim()
|
||||
const from = String(config?.resendFromEmail || '').trim()
|
||||
const key = getRuntimeEnvValue('RESEND_API_KEY', 'resendApiKey', String(config?.resendApiKey || '')).trim()
|
||||
const from = getRuntimeEnvValue('RESEND_FROM_EMAIL', 'resendFromEmail', String(config?.resendFromEmail || '')).trim()
|
||||
return Boolean(key && from)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user