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

+16 -16
View File
@@ -10,25 +10,25 @@ export const dynamic = "force-dynamic";
const SENSITIVE = ["secret", "api_key", "password", "token", "webhook"];
function isSensitive(key: string): boolean {
const k = key.toLowerCase();
return SENSITIVE.some((needle) => k.includes(needle));
const k = key.toLowerCase();
return SENSITIVE.some((needle) => k.includes(needle));
}
export async function GET(_req: Request) {
try {
const rows = await prisma.websiteSetting.findMany({
select: { key: true, value: true },
});
try {
const rows = await prisma.websiteSetting.findMany({
select: { key: true, value: true },
});
const settings: Record<string, string> = {};
for (const row of rows) {
if (isSensitive(row.key)) continue;
settings[row.key] = row.value;
}
const settings: Record<string, string> = {};
for (const row of rows) {
if (isSensitive(row.key)) continue;
settings[row.key] = row.value;
}
return apiJson(settings);
} catch {
// DB unavailable — serve an empty settings map rather than a 500.
return apiJson({}, { status: 200 });
}
return apiJson(settings);
} catch {
// DB unavailable — serve an empty settings map rather than a 500.
return apiJson({}, { status: 200 });
}
}