fix: prettier formatting and downgrade upload-artifact to v3 for Gitea
CI / Code Health (pull_request) Successful in 24s
CI / Lint, Test & Build (pull_request) Successful in 59s

This commit is contained in:
fristy committed 2026-09-12 00:47:38 +03:00
1 parent 7fa3a94278
commit ed149ded52
9 files changed
+32 -23

No files matched your search

+2 -9
View File
@@ -22,10 +22,7 @@ export function isAllowedOrigin(request: Request): boolean {
}
function resolveAllowedOrigin(origin: string | null): string {
if (
origin !== null &&
(origin === ALLOWED_ORIGIN || (isDev() && DEV_ORIGINS.has(origin)))
) {
if (origin !== null && (origin === ALLOWED_ORIGIN || (isDev() && DEV_ORIGINS.has(origin)))) {
return origin;
}
return ALLOWED_ORIGIN;
@@ -79,11 +76,7 @@ export function jsonErrorWithCors(
},
});
}
export function jsonWithCors(
data: unknown,
sMaxage = 3600,
origin?: string | null,
): NextResponse {
export function jsonWithCors(data: unknown, sMaxage = 3600, origin?: string | null): NextResponse {
return NextResponse.json(data, {
headers: {
"Cache-Control": `public, s-maxage=${sMaxage}, stale-while-revalidate=86400`,