🔧 feat(actions): Allow Multiple Actions from Same Domain per Assistant (#2120)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user