const BACKEND_URL = process.env.BACKEND_URL; export async function GET( _request: Request, { params }: { params: Promise<{ username: string }> }, ) { const { username } = await params; const response = await fetch(`${BACKEND_URL}/users/user/name/${username}`); if (!response.ok) { return new Response("Request failed in backend", { status: response.status, }); } const data = await response.json(); return Response.json(data); }