Mobile friendly, lint correction, typescript error clear

This commit is contained in:
Marcelo
2026-01-16 22:39:16 +00:00
parent 0f88207f3f
commit c183dda383
58 changed files with 7199 additions and 2714 deletions

View File

@@ -154,8 +154,9 @@ export async function POST(req: Request) {
},
});
break;
} catch (err: any) {
if (err?.code !== "P2002") throw err;
} catch (err: unknown) {
const code = typeof err === "object" && err !== null ? (err as { code?: string }).code : undefined;
if (code !== "P2002") throw err;
}
}
@@ -184,9 +185,9 @@ export async function POST(req: Request) {
text: content.text,
html: content.html,
});
} catch (err: any) {
} catch (err: unknown) {
emailSent = false;
emailError = err?.message || "Failed to send invite email";
emailError = err instanceof Error ? err.message : "Failed to send invite email";
}
return NextResponse.json({ ok: true, invite, emailSent, emailError });