From 08007fc8ee140af327eb3f06973e9051a1d2c3c6 Mon Sep 17 00:00:00 2001 From: Shamzic Date: Tue, 21 Nov 2023 14:28:36 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20manquait=20champ=20type=20=C3=A0=20la=20?= =?UTF-8?q?cr=C3=A9ation=20du=20survey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/lib/messaging/sending.ts | 1 - backend/models/followup.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/lib/messaging/sending.ts b/backend/lib/messaging/sending.ts index a8ce1a3a09..e1fe556915 100644 --- a/backend/lib/messaging/sending.ts +++ b/backend/lib/messaging/sending.ts @@ -4,7 +4,6 @@ import { EmailType } from "../../../lib/enums/messaging.js" import { SurveyType } from "../../../lib/enums/survey.js" import Followups from "../../models/followup.js" import { Followup } from "../../../lib/types/followup.js" -import { Survey } from "../../../lib/types/survey.js" import { sendSimulationResultsEmail, sendSurveyEmail, diff --git a/backend/models/followup.ts b/backend/models/followup.ts index c2d35e0bdc..c2ded315dd 100644 --- a/backend/models/followup.ts +++ b/backend/models/followup.ts @@ -67,7 +67,7 @@ FollowupSchema.method( async function (surveyType: SurveyType): Promise { let survey = this.surveys.find((survey) => survey.type === surveyType) if (!survey) { - survey = await this.surveys.create({ surveyType }) + survey = await this.surveys.create({ type: surveyType }) this.surveys.push(survey) } return survey