13 lines
408 B
TypeScript
13 lines
408 B
TypeScript
import { API } from "@/lib/site";
|
|
|
|
export async function POST(request: Request) {
|
|
const body = await request.json();
|
|
const response = await fetch(`${API.base}/tenants/${API.domain}/comments`, {
|
|
method: "POST",
|
|
headers: { "Content-Type": "application/json" },
|
|
body: JSON.stringify(body),
|
|
});
|
|
const data = await response.json();
|
|
return Response.json(data, { status: response.status });
|
|
}
|