mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-08 00:52:37 +01:00
fix: make support_contact field a nested object rather than a sub-document
This commit is contained in:
parent
d971235d2f
commit
5fb4817e6d
3 changed files with 23 additions and 14 deletions
|
|
@ -99,21 +99,11 @@ const agentSchema = new Schema<IAgent>(
|
|||
default: 'general',
|
||||
},
|
||||
support_contact: {
|
||||
type: {
|
||||
name: {
|
||||
type: String,
|
||||
trim: true,
|
||||
},
|
||||
email: {
|
||||
type: String,
|
||||
match: [
|
||||
/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/,
|
||||
'Please enter a valid email address.',
|
||||
],
|
||||
trim: true,
|
||||
},
|
||||
type: Schema.Types.Mixed,
|
||||
default: {
|
||||
name: '',
|
||||
email: '',
|
||||
},
|
||||
default: {},
|
||||
},
|
||||
is_promoted: {
|
||||
type: Boolean,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue