Merge pull request #15740 from overleaf/dk-odc-newprops

Store ODC form step 3 data in mongo

GitOrigin-RevId: 91311efaddb5ccb9a456ea359140235235530536
This commit is contained in:
Rebeka Dekany 2023-11-13 18:01:08 +01:00 committed by Copybot
parent bce5a31267
commit 1c834cbfaf
2 changed files with 24 additions and 0 deletions

View file

@ -17,6 +17,14 @@ async function upsertOnboardingDataCollection({
lastName,
usedLatex,
primaryOccupation,
companyDivisionDepartment,
companyJobTitle,
governmentJobTitle,
otherJobTitle,
nonprofitDivisionDepartment,
nonprofitJobTitle,
role,
subjectArea,
updatedAt,
}) {
const odc = await OnboardingDataCollection.findOneAndUpdate(
@ -26,6 +34,14 @@ async function upsertOnboardingDataCollection({
lastName,
usedLatex,
primaryOccupation,
companyDivisionDepartment,
companyJobTitle,
governmentJobTitle,
otherJobTitle,
nonprofitDivisionDepartment,
nonprofitJobTitle,
role,
subjectArea,
updatedAt,
},
{ upsert: true }

View file

@ -7,6 +7,14 @@ const OnboardingDataCollectionSchema = new Schema(
lastName: { type: String, default: null },
primaryOccupation: { type: String, default: null },
usedLatex: { type: String, default: null },
companyDivisionDepartment: { type: String, default: null },
companyJobTitle: { type: String, default: null },
governmentJobTitle: { type: String, default: null },
otherJobTitle: { type: String, default: null },
nonprofitDivisionDepartment: { type: String, default: null },
nonprofitJobTitle: { type: String, default: null },
role: { type: String, default: null },
subjectArea: { type: String, default: null },
updatedAt: { type: Date, default: Date.now },
},
{