style: format code biome
Local Build and Deploy / deploy (push) Failing after 46s

This commit is contained in:
openhands committed 2026-07-13 21:57:41 +02:00
1 parent 8efd032cc6
commit df38dccbf1
735 files changed
+128321 -120870

No files matched your search

+34 -31
View File
@@ -10,38 +10,41 @@ import { prisma } from "@/lib/prisma";
export const dynamic = "force-dynamic";
export async function GET(_req: Request, { params }: { params: Promise<{ username: string }> }) {
const { username } = await params;
export async function GET(
_req: Request,
{ params }: { params: Promise<{ username: string }> },
) {
const { username } = await params;
try {
const user = await prisma.user.findUnique({
where: { username },
select: {
username: true,
look: true,
motto: true,
rank: true,
credits: true,
online: true,
accountCreated: true,
},
});
try {
const user = await prisma.user.findUnique({
where: { username },
select: {
username: true,
look: true,
motto: true,
rank: true,
credits: true,
online: true,
accountCreated: true,
},
});
if (!user) {
return apiJson({ error: "User not found" }, { status: 404 });
}
if (!user) {
return apiJson({ error: "User not found" }, { status: 404 });
}
return apiJson({
username: user.username,
look: user.look,
motto: user.motto,
rank: user.rank,
credits: user.credits,
online: user.online === "1",
accountCreated: user.accountCreated,
});
} catch {
// DB unreachable — behave as "not found" rather than 500.
return apiJson({ error: "User not found" }, { status: 404 });
}
return apiJson({
username: user.username,
look: user.look,
motto: user.motto,
rank: user.rank,
credits: user.credits,
online: user.online === "1",
accountCreated: user.accountCreated,
});
} catch {
// DB unreachable — behave as "not found" rather than 500.
return apiJson({ error: "User not found" }, { status: 404 });
}
}