fix: eslint

This commit is contained in:
Edqe14 2026-05-15 14:13:08 +07:00
parent c37f8f77c2
commit 46567538dc
Signed by: yukabi
GPG key ID: A1AAC4DC1157D70D
6 changed files with 6 additions and 9 deletions

View file

@ -15,6 +15,6 @@ export default [
},
},
{
ignores: ["eslint.config.js", "prettier.config.js"],
ignores: ["eslint.config.js", "prettier.config.js", ".output/**"],
},
];

View file

@ -90,9 +90,7 @@ function GlobalNav({ pathname }: { pathname: string }) {
const isActive =
to === "/apps"
? pathname === "/apps" || pathname === "/apps/"
: to === "/sessions"
? pathname.startsWith("/sessions")
: pathname === to;
: pathname === to;
return (
<Link

View file

@ -27,7 +27,7 @@ export async function authenticateApiKey(
});
for (const candidate of candidates) {
if (candidate.app?.deletedAt) continue;
if (candidate.app.deletedAt) continue;
const valid = await verifyApiKey(key, candidate.keyHash);
if (valid) return { appId: candidate.appId, keyId: candidate.id };
}

View file

@ -57,7 +57,6 @@ export async function usePostgresAuthState(
async set(data: SignalDataSet) {
for (const [type, typeData] of Object.entries(data)) {
if (!typeData) continue;
for (const [id, value] of Object.entries(typeData)) {
if (value == null) {
await db

View file

@ -17,7 +17,7 @@ export const Route = createFileRoute("/api/v1/admin/apps/")({
const session = await readSession(request);
if (!session?.userId) return jsonError("Unauthorized", 401);
let body: { name: string; maxSessions?: number };
let body: { name?: string; maxSessions?: number };
try {
body = await request.json();
} catch {

View file

@ -56,12 +56,12 @@ async function api(
opts: { apiKey?: string; body?: unknown } = {},
): Promise<ApiResult> {
return page.evaluate(
async ({ method, url, apiKey, body }) => {
async ({ method: httpMethod, url, apiKey, body }) => {
const headers: Record<string, string> = {};
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
if (body !== undefined) headers["Content-Type"] = "application/json";
const res = await fetch(url, {
method,
method: httpMethod,
headers,
body: body !== undefined ? JSON.stringify(body) : undefined,
});