mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-24 04:10:15 +01:00
refactor: Update support_contact field initialization in agent model
- Removed handling for empty support_contact object in createAgent function. - Changed default value of support_contact in agent schema to undefined.
This commit is contained in:
parent
b750f52727
commit
98de99d9ac
2 changed files with 1 additions and 12 deletions
|
|
@ -39,14 +39,6 @@ const createAgent = async (agentData) => {
|
|||
category: agentData.category || 'general',
|
||||
};
|
||||
|
||||
// Handle empty support_contact object
|
||||
if (agentData.support_contact && Object.keys(agentData.support_contact).length === 0) {
|
||||
initialAgentData.support_contact = {
|
||||
name: '',
|
||||
email: '',
|
||||
};
|
||||
}
|
||||
|
||||
return (await Agent.create(initialAgentData)).toObject();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue