fix: response cache invalidation on person delete (#4300)

Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
This commit is contained in:
Piyush Gupta
2024-11-13 19:43:55 +05:30
committed by GitHub
parent 844ea40c3a
commit 78dca7a2bf
2 changed files with 57 additions and 5 deletions

View File

@@ -255,12 +255,16 @@ export const LinkSurvey = ({
apiHost: webAppUrl,
environmentId: survey.environmentId,
});
const res = await api.client.display.create({
surveyId: survey.id,
...(userId && { userId }),
});
if (!res.ok) {
throw new Error(t("s.could_not_create_display"));
}
const { id } = res.data;
surveyState.updateDisplayId(id);