feat: visual indicator for global agent, remove author when serving to non-author

This commit is contained in:
Danny Avila 2024-09-04 21:02:01 -04:00
parent 1bc0689134
commit 2c6874013a
No known key found for this signature in database
GPG key ID: 2DD9CC89B9B50364
6 changed files with 77 additions and 29 deletions

View file

@ -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);