feat: implement device-specific configurations for desktop, tablet, and mobile
All checks were successful
Production Build & Deploy / build-and-deploy (push) Successful in 57s
All checks were successful
Production Build & Deploy / build-and-deploy (push) Successful in 57s
This commit is contained in:
@@ -11,7 +11,7 @@ export const POST: APIRoute = async ({ request }) => {
|
||||
fs.mkdirSync(dataDir, { recursive: true });
|
||||
}
|
||||
|
||||
const { siteConfig: currentSite, themeConfig: currentTheme, smtpConfig: currentSmtp } = loadWaasConfigs();
|
||||
const { siteConfig: currentSite, themeConfig: currentTheme, smtpConfig: currentSmtp } = loadWaasConfigs(Astro.request.headers.get('user-agent') ?? '');
|
||||
|
||||
if (body.siteConfig) {
|
||||
const newSite = {
|
||||
|
||||
@@ -13,7 +13,7 @@ export const POST: APIRoute = async ({ request }) => {
|
||||
return new Response(JSON.stringify({ success: false, message: 'Bitte füllen Sie alle Pflichtfelder aus.' }), { status: 400, headers: { 'Content-Type': 'application/json' } });
|
||||
}
|
||||
|
||||
const { smtpConfig, siteConfig } = loadWaasConfigs();
|
||||
const { smtpConfig, siteConfig } = loadWaasConfigs(Astro.request.headers.get('user-agent') ?? '');
|
||||
|
||||
if (!smtpConfig.isConfigured || smtpConfig.host === 'smtp.placeholder.local') {
|
||||
console.log('[WaaS Contact API] (Demo Mode) Received Submission:', { name, email, message });
|
||||
|
||||
Reference in New Issue
Block a user