Store ODC form results in onboardingDataCollection (#15609)
* registration/onboarding page * show only if in split test group * rate limiter, skip errors * fix storybook logo * remove skip payload * fix typos * prettier * store ODC form results in onboardingDataCollection * add userId * prettier * pick what properties should be stored * remove unused props * remove userId index * update user profile * update user profile * use setOp * added test * remove userId from schema * clean after user delete * mock unit test * limit to 255 chars * updatedAt field * prettier * firstName, lastName as separate vars * move subscribe at the end * check if user exists GitOrigin-RevId: 6d76927e97b5f4ed664ffb9b8806b3516c77eb9b
This commit is contained in:
committed by
Copybot
parent
33981d7f91
commit
330a9c8e3a
@@ -0,0 +1,24 @@
|
||||
const mongoose = require('../infrastructure/Mongoose')
|
||||
const { Schema } = mongoose
|
||||
|
||||
const OnboardingDataCollectionSchema = new Schema(
|
||||
{
|
||||
firstName: { type: String, default: null },
|
||||
lastName: { type: String, default: null },
|
||||
primaryOccupation: { type: String, default: null },
|
||||
usedLatex: { type: String, default: null },
|
||||
updatedAt: { type: Date, default: Date.now },
|
||||
},
|
||||
{
|
||||
collection: 'onboardingDataCollection',
|
||||
minimize: false,
|
||||
}
|
||||
)
|
||||
|
||||
module.exports = {
|
||||
OnboardingDataCollection: mongoose.model(
|
||||
'OnboardingDataCollection',
|
||||
OnboardingDataCollectionSchema
|
||||
),
|
||||
OnboardingDataCollectionSchema,
|
||||
}
|
||||
Reference in New Issue
Block a user