From 7cddd943d0c1cb566bd58bc6fa28a16a2e26b73c Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Sat, 16 Mar 2024 19:40:51 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20feat(actions):=20Allow=20Multipl?= =?UTF-8?q?e=20Actions=20from=20Same=20Domain=20per=20Assistant=20(#2120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/server/routes/assistants/actions.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/api/server/routes/assistants/actions.js b/api/server/routes/assistants/actions.js index 05e528a501..a68187e268 100644 --- a/api/server/routes/assistants/actions.js +++ b/api/server/routes/assistants/actions.js @@ -74,14 +74,7 @@ router.post('/:assistant_id', async (req, res) => { const { actions: _actions = [] } = assistant_data ?? {}; const actions = []; for (const action of _actions) { - const [action_domain, current_action_id] = action.split(actionDelimiter); - if (action_domain === domain && !_action_id) { - // TODO: dupe check on the frontend - return res.status(400).json({ - message: `Action sets cannot have duplicate domains - ${domain} already exists on another action`, - }); - } - + const [_action_domain, current_action_id] = action.split(actionDelimiter); if (current_action_id === action_id) { continue; }