Skip to content

Commit

Permalink
🔧 feat(actions): Allow Multiple Actions from Same Domain per Assistant (
Browse files Browse the repository at this point in the history
  • Loading branch information
danny-avila authored Mar 16, 2024
1 parent 8859974 commit 80b8ac8
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions server/routes/assistants/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 80b8ac8

Please sign in to comment.