Make email service initialization asynchronous
All checks were successful
Build And Push Image / docker (push) Successful in 3m10s
All checks were successful
Build And Push Image / docker (push) Successful in 3m10s
Convert getEmailService() to async function and update all callers to use await. Replace synchronous require() with dynamic import() for admin-config module. Add SMTP config loading to admin configuration dialog.
This commit is contained in:
@@ -673,6 +673,12 @@ const loadConfigurations = async () => {
|
||||
if (registrationResponse.success && registrationResponse.data) {
|
||||
registrationForm.value = { ...registrationResponse.data };
|
||||
}
|
||||
|
||||
// Load SMTP/Email config
|
||||
const smtpResponse = await $fetch<{ success: boolean; data?: SMTPConfig }>('/api/admin/smtp-config');
|
||||
if (smtpResponse.success && smtpResponse.data) {
|
||||
emailForm.value = { ...smtpResponse.data };
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to load configurations:', error);
|
||||
errorMessage.value = 'Failed to load current settings';
|
||||
|
||||
Reference in New Issue
Block a user