From 86c8da349412df4b50c01622bb158f574f35f2dd Mon Sep 17 00:00:00 2001 From: Anshuman Pandey <54475686+pandeymangg@users.noreply.github.com> Date: Tue, 23 Apr 2024 19:35:50 +0530 Subject: [PATCH] fix: Backwards compatibility for js/sync endpoint (#2516) --- apps/web/app/api/v1/(legacy)/js/sync/lib/sync.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/web/app/api/v1/(legacy)/js/sync/lib/sync.ts b/apps/web/app/api/v1/(legacy)/js/sync/lib/sync.ts index f207a0f62d..d894362271 100644 --- a/apps/web/app/api/v1/(legacy)/js/sync/lib/sync.ts +++ b/apps/web/app/api/v1/(legacy)/js/sync/lib/sync.ts @@ -101,7 +101,9 @@ export const getUpdatedState = async (environmentId: string, personId?: string): surveys = await getSyncSurveys(environmentId, (person as TPerson).id); } else { surveys = await getSurveys(environmentId); - surveys = surveys.filter((survey) => survey.type === "web" && survey.status === "inProgress"); + surveys = surveys.filter( + (survey) => (survey.type === "app" || survey.type === "website") && survey.status === "inProgress" + ); } surveys = transformLegacySurveys(surveys);