Add the FarrokhWin Next.js site for Meshkee hosting.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-31 09:18:26 +03:30
co-authored by Cursor
commit 4dec4eb92c
116 changed files with 13456 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
import { NextResponse } from "next/server";
import { meshkeeApiBase, websiteDomain } from "@/lib/config";
export async function POST(request: Request) {
const body = (await request.json()) as {
title?: string;
name?: string;
email?: string;
cellNumber?: string;
text?: string;
};
if (!body.title?.trim() || !body.name?.trim() || !body.text?.trim()) {
return NextResponse.json({ message: "نام و متن پیام الزامی است." }, { status: 400 });
}
const response = await fetch(
`${meshkeeApiBase}/tenants/${encodeURIComponent(websiteDomain)}/contact-submissions`,
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
title: body.title.trim(),
name: body.name.trim(),
email: body.email?.trim() || undefined,
cellNumber: body.cellNumber?.trim() || undefined,
text: body.text.trim(),
}),
cache: "no-store",
},
);
const data = await response.json().catch(() => ({}));
return NextResponse.json(data, { status: response.status });
}