fix: handle not found errors for Mii and User in API responses

This commit is contained in:
Yael Monterrubio 2026-04-19 14:54:15 -06:00
parent d58054a587
commit d5b488a5c9
4 changed files with 12 additions and 4 deletions

View file

@ -34,5 +34,7 @@ export async function GET(request: NextRequest, { params }: { params: Promise<{
},
});
if (!mii) return NextResponse.json({ error: "Mii not found" }, { status: 404 });
return NextResponse.json(mii);
}

View file

@ -21,5 +21,7 @@ export async function GET(request: NextRequest, { params }: { params: Promise<{
},
});
if (!user) return NextResponse.json({ error: "User not found" }, { status: 404 });
return NextResponse.json(user);
}