This commit is contained in:
mdares
2026-01-06 15:47:19 +00:00
parent ea92b32618
commit 05a30b2a21
4 changed files with 97 additions and 8 deletions

7
app/api/health/route.ts Normal file
View File

@@ -0,0 +1,7 @@
import { NextResponse } from "next/server";
import { logLine } from "@/lib/logger";
export async function GET() {
logLine("health.hit", { ok: true });
return NextResponse.json({ ok: true });
}

View File

@@ -5,6 +5,8 @@ import { prisma } from "@/lib/prisma";
import { DEFAULT_ALERTS, DEFAULT_DEFAULTS, DEFAULT_SHIFT } from "@/lib/settings";
import { buildVerifyEmail, sendEmail } from "@/lib/email";
import { getBaseUrl } from "@/lib/appUrl";
import { logLine } from "@/lib/logger";
function slugify(input: string) {
const trimmed = input.trim().toLowerCase();
@@ -120,10 +122,16 @@ export async function POST(req: Request) {
text: emailContent.text,
html: emailContent.html,
});
} catch {
} catch (err: any) {
emailSent = false;
logLine("signup.verify_email.failed", {
email,
message: err?.message,
code: err?.code,
response: err?.response,
responseCode: err?.responseCode,
});
}
return NextResponse.json({
ok: true,
verificationRequired: true,