fixes recaptcha
All checks were successful
Build And Push Image / docker (push) Successful in 3m12s

This commit is contained in:
2025-08-08 21:10:00 +02:00
parent 3951ce1d4e
commit aed8dc68fc
4 changed files with 88 additions and 6 deletions

View File

@@ -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
}
});