This commit is contained in:
@@ -386,19 +386,25 @@ async function submitRegistration() {
|
||||
// Load configurations on mount
|
||||
onMounted(async () => {
|
||||
try {
|
||||
// Load reCAPTCHA config (public endpoint)
|
||||
const recaptchaResponse = await $fetch('/api/admin/recaptcha-config') as any;
|
||||
// Load reCAPTCHA config (public endpoint - no authentication required)
|
||||
const recaptchaResponse = await $fetch('/api/recaptcha-config') as any;
|
||||
if (recaptchaResponse?.success && recaptchaResponse?.data?.siteKey) {
|
||||
recaptchaConfig.value.siteKey = recaptchaResponse.data.siteKey;
|
||||
console.log('✅ reCAPTCHA site key loaded successfully');
|
||||
} else {
|
||||
console.warn('❌ reCAPTCHA not configured or failed to load');
|
||||
}
|
||||
|
||||
// Load registration config (public endpoint)
|
||||
const registrationResponse = await $fetch('/api/admin/registration-config') as any;
|
||||
// Load registration config (public endpoint - no authentication required)
|
||||
const registrationResponse = await $fetch('/api/registration-config') as any;
|
||||
if (registrationResponse?.success) {
|
||||
registrationConfig.value = registrationResponse.data;
|
||||
console.log('✅ Registration config loaded successfully');
|
||||
} else {
|
||||
console.warn('❌ Registration config failed to load');
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('Failed to load configuration:', error);
|
||||
console.error('Failed to load configuration:', error);
|
||||
// Page will still work with default values
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user