diff --git a/packages/lib/survey/service.ts b/packages/lib/survey/service.ts index ffa082540a..2477d8d4e6 100644 --- a/packages/lib/survey/service.ts +++ b/packages/lib/survey/service.ts @@ -5,7 +5,7 @@ import { TActionClass } from "@formbricks/types/actionClasses"; import { ZOptionalNumber } from "@formbricks/types/common"; import { ZId } from "@formbricks/types/environment"; import { DatabaseError, ResourceNotFoundError } from "@formbricks/types/errors"; -import { TPerson, ZPerson } from "@formbricks/types/people"; +import { TPerson } from "@formbricks/types/people"; import { TSurvey, TSurveyAttributeFilter, TSurveyInput, ZSurvey } from "@formbricks/types/surveys"; import { Prisma } from "@prisma/client"; import { unstable_cache } from "next/cache"; @@ -14,6 +14,7 @@ import { getAttributeClasses } from "../attributeClass/service"; import { ITEMS_PER_PAGE, SERVICES_REVALIDATION_INTERVAL } from "../constants"; import { displayCache } from "../display/cache"; import { getDisplaysByPersonId } from "../display/service"; +import { personCache } from "../person/cache"; import { productCache } from "../product/cache"; import { getProductByEnvironmentId } from "../product/service"; import { responseCache } from "../response/cache"; @@ -22,7 +23,6 @@ import { diffInDays } from "../utils/datetime"; import { validateInputs } from "../utils/validate"; import { surveyCache } from "./cache"; import { formatSurveyDateFields } from "./util"; -import { personCache } from "../person/cache"; export const selectSurvey = { id: true, @@ -608,7 +608,7 @@ export const duplicateSurvey = async (environmentId: string, surveyId: string) = }; export const getSyncSurveys = (environmentId: string, person: TPerson): Promise => { - validateInputs([environmentId, ZId], [person, ZPerson]); + validateInputs([environmentId, ZId]); return unstable_cache( async () => {