Skip to content

Commit e336861

Browse files
committed
feat(config): add support for initial admin email environment variable
- Introduce new getter `initialAdminEmail` in EnvironmentConfig class - This allows for seeding the first administrator account on startup - Returns null if the `INITIAL_ADMIN_EMAIL` environment variable is not set
1 parent cb44a3e commit e336861

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/src/config/environment_config.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,10 @@ abstract final class EnvironmentConfig {
133133
///
134134
/// Returns `null` if the `SENDGRID_API_URL` is not set.
135135
static String? get sendGridApiUrl => _env['SENDGRID_API_URL'];
136+
137+
/// Retrieves the initial admin email from the environment, if provided.
138+
///
139+
/// This is used for seeding the first administrator account on startup.
140+
/// Returns `null` if the `INITIAL_ADMIN_EMAIL` is not set.
141+
static String? get initialAdminEmail => _env['INITIAL_ADMIN_EMAIL'];
136142
}

0 commit comments

Comments
 (0)