feat: Enhance Dockerfile with verification for standalone output and update n8n status route to handle missing webhook URL
Some checks failed
CI/CD Pipeline (Dev/Staging) / staging (push) Failing after 7m56s

This commit is contained in:
2026-01-09 02:36:21 +01:00
parent 0e578dd833
commit 393e8c01cd
3 changed files with 179 additions and 1 deletions

View File

@@ -6,10 +6,23 @@ export const revalidate = 30;
export async function GET() {
try {
// Check if n8n webhook URL is configured
const n8nWebhookUrl = process.env.N8N_WEBHOOK_URL;
if (!n8nWebhookUrl) {
// Return fallback if n8n is not configured
return NextResponse.json({
status: { text: "offline", color: "gray" },
music: null,
gaming: null,
coding: null,
});
}
// Rufe den n8n Webhook auf
// Add timestamp to query to bypass Cloudflare cache
const res = await fetch(
`${process.env.N8N_WEBHOOK_URL}/webhook/denshooter-71242/status?t=${Date.now()}`,
`${n8nWebhookUrl}/webhook/denshooter-71242/status?t=${Date.now()}`,
{
method: "GET",
headers: {