From 1a5e5fc845192a06a690d095d1ebd81fd2f0c5cc Mon Sep 17 00:00:00 2001 From: Matti Nannt Date: Thu, 14 Sep 2023 01:38:51 +0900 Subject: [PATCH] make sync endpoint unavailable (#808) --- apps/web/app/api/v1/js/sync/route.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/web/app/api/v1/js/sync/route.ts b/apps/web/app/api/v1/js/sync/route.ts index d19ad196f9..d636c1d3a2 100644 --- a/apps/web/app/api/v1/js/sync/route.ts +++ b/apps/web/app/api/v1/js/sync/route.ts @@ -10,6 +10,7 @@ import { captureTelemetry } from "@formbricks/lib/telemetry"; import { TJsState, ZJsSyncInput } from "@formbricks/types/v1/js"; import { TPerson } from "@formbricks/types/v1/people"; import { TSession } from "@formbricks/types/v1/sessions"; +import { notFound } from "next/navigation"; import { NextResponse } from "next/server"; const captureNewSessionTelemetry = async (jsVersion?: string): Promise => { @@ -21,6 +22,7 @@ export async function OPTIONS(): Promise { } export async function POST(req: Request): Promise { + notFound(); // hotfix - return not found in sync endpoint to prevent current usage issues try { const jsonInput = await req.json();