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

+25 -25
View File
@@ -10,31 +10,31 @@ export const dynamic = "force-dynamic";
* used by the public pages and the admin dashboard.
*/
export async function GET(_req: Request) {
let articles: unknown[] = [];
let online = 0;
let hotelName = "Atom";
let articles: unknown[] = [];
let online = 0;
let hotelName = "Atom";
try {
[articles, online, hotelName] = await Promise.all([
prisma.websiteArticles.findMany({
select: {
id: true,
title: true,
slug: true,
shortStory: true,
image: true,
createdAt: true,
},
orderBy: { createdAt: "desc" },
take: 4,
}),
prisma.user.count({ where: { online: "1" } }),
siteSettings.get("hotel_name", "Atom").then((v) => v ?? "Atom"),
]);
try {
[articles, online, hotelName] = await Promise.all([
prisma.websiteArticles.findMany({
select: {
id: true,
title: true,
slug: true,
shortStory: true,
image: true,
createdAt: true,
},
orderBy: { createdAt: "desc" },
take: 4,
}),
prisma.user.count({ where: { online: "1" } }),
siteSettings.get("hotel_name", "Atom").then((v) => v ?? "Atom"),
]);
return apiJson({ articles, online, hotelName });
} catch {
// DB unavailable — return an empty payload instead of a 500.
return apiJson({ articles: [], online: 0, hotelName }, { status: 200 });
}
return apiJson({ articles, online, hotelName });
} catch {
// DB unavailable — return an empty payload instead of a 500.
return apiJson({ articles: [], online: 0, hotelName }, { status: 200 });
}
}