chore:little fixes and formating and linting and patches

This commit is contained in:
2026-03-31 15:50:54 +02:00
parent a1ce71ffb6
commit 9b197abcfa
815 changed files with 22960 additions and 8982 deletions

View File

@@ -21,7 +21,7 @@ function getClientHeaders(req: Request): Headers {
headers.set('Content-Type', 'application/json');
headers.set(
'openpanel-client-id',
req.headers.get('openpanel-client-id') ?? '',
req.headers.get('openpanel-client-id') ?? ''
);
// Construct origin: browsers send Origin header for POST requests and cross-origin requests,
@@ -45,7 +45,7 @@ function getClientHeaders(req: Request): Headers {
async function handleApiRoute(
req: Request,
apiUrl: string,
apiPath: string,
apiPath: string
): Promise<NextResponse> {
const headers = getClientHeaders(req);
@@ -67,7 +67,7 @@ async function handleApiRoute(
error: 'Failed to proxy request',
message: e instanceof Error ? e.message : String(e),
},
{ status: 500 },
{ status: 500 }
);
}
}
@@ -87,8 +87,8 @@ async function handleScriptProxyRoute(req: Request): Promise<NextResponse> {
try {
const res = await fetch(scriptUrl, {
// @ts-ignore
next: { revalidate: 86400 },
// @ts-expect-error
next: { revalidate: 86_400 },
});
const text = await res.text();
const etag = `"${createHash('md5')
@@ -108,7 +108,7 @@ async function handleScriptProxyRoute(req: Request): Promise<NextResponse> {
error: 'Failed to fetch script',
message: e instanceof Error ? e.message : String(e),
},
{ status: 500 },
{ status: 500 }
);
}
}