From 90a81f353d33ac5cef23b8c3c160f6168b61d6bb Mon Sep 17 00:00:00 2001 From: Pihkaal Date: Wed, 25 Mar 2026 21:42:20 +0100 Subject: [PATCH] chore: fix eslint and make nuxt typecheck happpy --- app/utils/api.ts | 3 +++ server/middleware/redirect.ts | 2 +- shared/types/app.ts | 3 --- 3 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 shared/types/app.ts diff --git a/app/utils/api.ts b/app/utils/api.ts index 452c03b..f259774 100644 --- a/app/utils/api.ts +++ b/app/utils/api.ts @@ -1,4 +1,7 @@ import { z } from "zod"; +import type { InternalApi } from "nitropack/types"; + +export type Link = InternalApi["/api/links"]["get"][number]; const apiErrorSchema = z.object({ data: z.object({ diff --git a/server/middleware/redirect.ts b/server/middleware/redirect.ts index 922502c..9f72bcf 100644 --- a/server/middleware/redirect.ts +++ b/server/middleware/redirect.ts @@ -15,7 +15,7 @@ export default defineEventHandler(async (event) => { const path = getRequestURL(event).pathname; - let link = await db.query.links.findFirst({ + const link = await db.query.links.findFirst({ where: eq(tables.links.path, path), }); diff --git a/shared/types/app.ts b/shared/types/app.ts deleted file mode 100644 index b0ab15b..0000000 --- a/shared/types/app.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { InternalApi } from "nitropack/types"; - -export type Link = InternalApi["/api/links"]["get"][number];