Adjusted SMTP

This commit is contained in:
2026-04-11 12:21:34 +02:00
parent 9a96d74f5c
commit 97b483c121
9 changed files with 339 additions and 24 deletions

View File

@@ -1,10 +1,11 @@
import { NextResponse } from "next/server";
import { requirePlatformRole } from "@/lib/session";
import { getTenantRequestById, updateTenantRequestStatus } from "@/lib/db";
import { sendRejectionEmail } from "@/lib/email";
/**
* POST /api/admin/requests/[id]/reject
* Reject a tenant request.
* Reject a tenant request and notify the customer.
*/
export async function POST(
request: Request,
@@ -36,6 +37,14 @@ export async function POST(
adminNotes,
});
// Notify customer
await sendRejectionEmail(
tenantRequest.contactEmail,
tenantRequest.contactName,
tenantRequest.companyName,
adminNotes
);
return NextResponse.json({
message: "Request rejected.",
request: updated,