mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 01:40:15 +01:00
feat: visual indicator for global agent, remove author when serving to non-author
This commit is contained in:
parent
1bc0689134
commit
2c6874013a
6 changed files with 77 additions and 29 deletions
|
|
@ -80,6 +80,10 @@ const getAgentHandler = async (req, res) => {
|
|||
return res.status(404).json({ error: 'Agent not found' });
|
||||
}
|
||||
|
||||
if (agent.author !== author) {
|
||||
delete agent.author;
|
||||
}
|
||||
|
||||
return res.status(200).json(agent);
|
||||
} catch (error) {
|
||||
logger.error('[/Agents/:id] Error retrieving agent', error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue