From 864580c0abfe125e0d1020844db8ef4ef22fef02 Mon Sep 17 00:00:00 2001 From: Denshooter Date: Thu, 13 Feb 2025 17:46:39 +0100 Subject: [PATCH] refactor(email): improve code formatting and error handling in email route --- app/api/fetchAllProjects/route.tsx | 4 ++-- app/api/sitemap/route.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/fetchAllProjects/route.tsx b/app/api/fetchAllProjects/route.tsx index 41fa120..7aa7cc6 100644 --- a/app/api/fetchAllProjects/route.tsx +++ b/app/api/fetchAllProjects/route.tsx @@ -2,7 +2,7 @@ import {NextResponse} from "next/server"; export const runtime = "nodejs"; // Force Node runtime -const GHOST_API_URL = "http://172.21.0.3:2368"; +const GHOST_API_URL = "http://192.168.179.31:2368"; const GHOST_API_KEY = process.env.GHOST_API_KEY; export async function GET() { @@ -12,7 +12,7 @@ export async function GET() { ); if (!response.ok) { console.error(`Failed to fetch posts: ${response.statusText}`); - return NextResponse.json({}); + return NextResponse.json([]); } const posts = await response.json(); return NextResponse.json(posts); diff --git a/app/api/sitemap/route.tsx b/app/api/sitemap/route.tsx index 67bfed3..8e929cd 100644 --- a/app/api/sitemap/route.tsx +++ b/app/api/sitemap/route.tsx @@ -11,7 +11,7 @@ interface ProjectsData { export const runtime = "nodejs"; // Force Node runtime -const GHOST_API_URL = "http://172.21.0.3:2368"; +const GHOST_API_URL = "http://192.168.179.31:2368"; const GHOST_API_KEY = process.env.GHOST_API_KEY; // Funktion, um die XML für die Sitemap zu generieren