mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-03 11:30:50 -05:00
652e0bc9c9
Signed-off-by: Neil Chauhan <neilchauhan2@gmail.com> Co-authored-by: Neil Chauhan <neilchauhan2@gmail.com> Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
18 lines
498 B
TypeScript
18 lines
498 B
TypeScript
import { responses } from "@/app/lib/api/response";
|
|
import { CRON_SECRET } from "@formbricks/lib/constants";
|
|
import { captureTelemetry } from "@formbricks/lib/telemetry";
|
|
import { headers } from "next/headers";
|
|
|
|
export async function POST() {
|
|
const headersList = headers();
|
|
const apiKey = headersList.get("x-api-key");
|
|
|
|
if (!apiKey || apiKey !== CRON_SECRET) {
|
|
return responses.notAuthenticatedResponse();
|
|
}
|
|
|
|
captureTelemetry("ping");
|
|
|
|
return responses.successResponse({}, true);
|
|
}
|