Skip to content

Commit

Permalink
fix: manquait champ type à la création du survey
Browse files Browse the repository at this point in the history
  • Loading branch information
Shamzic committed Nov 22, 2023
1 parent 949c02a commit e53f734
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion backend/lib/messaging/sending.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion backend/models/followup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ FollowupSchema.method(
async function (surveyType: SurveyType): Promise<Survey> {
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
Expand Down

0 comments on commit e53f734

Please sign in to comment.