style: format code biome
This commit is contained in:
@@ -10,10 +10,12 @@ import { prisma } from "@/lib/prisma";
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export async function GET(_req: Request) {
|
||||
try {
|
||||
const count = await cached("online_count", 10_000, () => prisma.user.count({ where: { online: "1" } }));
|
||||
return apiJson({ count });
|
||||
} catch {
|
||||
return apiJson({ count: 0 });
|
||||
}
|
||||
try {
|
||||
const count = await cached("online_count", 10_000, () =>
|
||||
prisma.user.count({ where: { online: "1" } }),
|
||||
);
|
||||
return apiJson({ count });
|
||||
} catch {
|
||||
return apiJson({ count: 0 });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user