const BACKEND_URL = process.env.BACKEND_URL; export async function GET() { console.log("Made it to the GET SERVICES ROUTE!"); const response = await fetch(`${BACKEND_URL}/services/all`); if (!response.ok) { return new Response("Request failed in backend", { status: response.status, }); } const data = await response.json(); return Response.json(data); } export async function POST(request: Request) { const body = await request.json(); const response = await fetch(`${BACKEND_URL}/services`, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(body), }); const data = await response.json(); return Response.json(data, { status: response.status, }); }