fix: fixes status schedule updation (#6312)

This commit is contained in:
Anshuman Pandey
2025-07-25 15:57:28 +05:30
committed by GitHub
parent 91ace0e821
commit 3045f4437f
@@ -18,6 +18,7 @@ import { updateSurvey } from "@/modules/survey/editor/lib/survey";
import { getSurveyFollowUpsPermission } from "@/modules/survey/follow-ups/lib/utils";
import { checkSpamProtectionPermission } from "@/modules/survey/lib/permission";
import { getOrganizationBilling, getSurvey } from "@/modules/survey/lib/survey";
import { revalidatePath } from "next/cache";
import { z } from "zod";
import { ZActionClassInput } from "@formbricks/types/action-classes";
import { OperationNotAllowedError, ResourceNotFoundError } from "@formbricks/types/errors";
@@ -84,6 +85,9 @@ export const updateSurveyAction = authenticatedActionClient.schema(ZSurvey).acti
const result = await updateSurvey(parsedInput);
ctx.auditLoggingCtx.oldObject = oldObject;
ctx.auditLoggingCtx.newObject = result;
revalidatePath(`/environments/${result.environmentId}/surveys/${result.id}`);
return result;
}
)