diff --git a/src/app/client/[token]/page.tsx b/src/app/client/[token]/page.tsx index 3047df0..6bd483c 100644 --- a/src/app/client/[token]/page.tsx +++ b/src/app/client/[token]/page.tsx @@ -90,8 +90,6 @@ export default async function ClientPage({ params: Promise<{ token: string }>; }) { const { token } = await params; - const { appendFileSync } = await import("fs"); - appendFileSync("/tmp/clienthub-debug.log", `[${new Date().toISOString()}] PAGE token=${token}\n`); const clientData = await getCachedClientData(token); if (!clientData) notFound(); diff --git a/src/lib/client-view.ts b/src/lib/client-view.ts index 3b48265..66fc3f7 100644 --- a/src/lib/client-view.ts +++ b/src/lib/client-view.ts @@ -133,9 +133,6 @@ export interface ClientProjectSummary { export async function getClientWithProjectsByToken( tokenOrSlug: string ): Promise { - const fs = await import("fs"); - const logLine = `[${new Date().toISOString()}] lookup: ${tokenOrSlug}\n`; - fs.appendFileSync("/tmp/clienthub-debug.log", logLine); try { // Try slug first let clientRows = await db @@ -178,8 +175,7 @@ export async function getClientWithProjectsByToken( return { client, projects: activeProjects }; } catch (err) { - const fs = await import("fs"); - fs.appendFileSync("/tmp/clienthub-debug.log", `[${new Date().toISOString()}] ERROR: ${String(err)}\nStack: ${(err as Error)?.stack ?? "no stack"}\n`); + console.error("[client-view] getClientWithProjectsByToken error:", err); return null; } }