4 neue dynamischen

This commit is contained in:
Timo Knuth
2026-01-11 01:29:21 +01:00
parent 268689f2ee
commit 05531cda3f
14 changed files with 1407 additions and 15 deletions

View File

@@ -59,6 +59,34 @@ export async function GET(
const baseUrlText = process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:3050';
destination = `${baseUrlText}/display?text=${encodeURIComponent(content.text || '')}`;
break;
case 'PDF':
// Direct link to file
destination = content.fileUrl || 'https://example.com/file.pdf';
break;
case 'APP':
// Smart device detection for app stores
const userAgent = request.headers.get('user-agent') || '';
const isIOS = /iphone|ipad|ipod/i.test(userAgent);
const isAndroid = /android/i.test(userAgent);
if (isIOS && content.iosUrl) {
destination = content.iosUrl;
} else if (isAndroid && content.androidUrl) {
destination = content.androidUrl;
} else {
destination = content.fallbackUrl || content.iosUrl || content.androidUrl || 'https://example.com';
}
break;
case 'COUPON':
// Redirect to coupon display page
const baseUrlCoupon = process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:3050';
destination = `${baseUrlCoupon}/coupon/${slug}`;
break;
case 'FEEDBACK':
// Redirect to feedback form page
const baseUrlFeedback = process.env.NEXT_PUBLIC_APP_URL || 'http://localhost:3050';
destination = `${baseUrlFeedback}/feedback/${slug}`;
break;
default:
destination = 'https://example.com';
}