|
|
@@ -7,16 +7,6 @@ const { ObjectId } = Schema
|
|
|
// See https://stackoverflow.com/questions/386294/what-is-the-maximum-length-of-a-valid-email-address/574698#574698
|
|
|
const MAX_EMAIL_LENGTH = 254
|
|
|
|
|
|
-const AuditLogEntrySchema = new Schema({
|
|
|
- _id: false,
|
|
|
- info: { type: Object },
|
|
|
- initiatorId: { type: Schema.Types.ObjectId },
|
|
|
- ipAddress: { type: String },
|
|
|
- operation: { type: String },
|
|
|
- userId: { type: Schema.Types.ObjectId },
|
|
|
- timestamp: { type: Date },
|
|
|
-})
|
|
|
-
|
|
|
const UserSchema = new Schema({
|
|
|
email: { type: String, default: '', maxlength: MAX_EMAIL_LENGTH },
|
|
|
emails: [
|
|
|
@@ -180,7 +170,6 @@ const UserSchema = new Schema({
|
|
|
secret: { type: String },
|
|
|
},
|
|
|
onboardingEmailSentAt: { type: Date },
|
|
|
- auditLog: [AuditLogEntrySchema],
|
|
|
splitTests: Schema.Types.Mixed,
|
|
|
analyticsId: { type: String },
|
|
|
surveyResponses: Schema.Types.Mixed,
|