mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-16 11:30:48 -05:00
temporarily deactivate sync endpoint (#809)
This commit is contained in:
@@ -1,29 +1,28 @@
|
||||
import { getSurveys } from "@/app/api/v1/js/surveys";
|
||||
/* import { getSurveys } from "@/app/api/v1/js/surveys"; */
|
||||
import { responses } from "@/lib/api/response";
|
||||
import { transformErrorToDetails } from "@/lib/api/validator";
|
||||
/* import { transformErrorToDetails } from "@/lib/api/validator";
|
||||
import { getActionClasses } from "@formbricks/lib/services/actionClass";
|
||||
import { getEnvironment } from "@formbricks/lib/services/environment";
|
||||
import { createPerson, getPerson } from "@formbricks/lib/services/person";
|
||||
import { getProductByEnvironmentId } from "@formbricks/lib/services/product";
|
||||
import { createSession, extendSession, getSession } from "@formbricks/lib/services/session";
|
||||
import { captureTelemetry } from "@formbricks/lib/telemetry";
|
||||
import { TJsState, ZJsSyncInput } from "@formbricks/types/v1/js";
|
||||
import { createSession, extendSession, getSession } from "@formbricks/lib/services/session"; */
|
||||
/* 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 { TSession } from "@formbricks/types/v1/sessions"; */
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
const captureNewSessionTelemetry = async (jsVersion?: string): Promise<void> => {
|
||||
/* const captureNewSessionTelemetry = async (jsVersion?: string): Promise<void> => {
|
||||
await captureTelemetry("session created", { jsVersion: jsVersion ?? "unknown" });
|
||||
};
|
||||
}; */
|
||||
|
||||
export async function OPTIONS(): Promise<NextResponse> {
|
||||
return responses.successResponse({}, true);
|
||||
}
|
||||
|
||||
export async function POST(req: Request): Promise<NextResponse> {
|
||||
notFound(); // hotfix - return not found in sync endpoint to prevent current usage issues
|
||||
try {
|
||||
export async function POST(/* req: Request */): Promise<NextResponse> {
|
||||
return responses.notFoundResponse("Sync", "Temporarily deactivated", true);
|
||||
/* try {
|
||||
const jsonInput = await req.json();
|
||||
|
||||
// validate using zod
|
||||
@@ -173,5 +172,5 @@ export async function POST(req: Request): Promise<NextResponse> {
|
||||
"Unable to complete response. See server logs for details.",
|
||||
true
|
||||
);
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user