Merge branch 'ent-12139-16339-llamada-api-new_agent-no-funciona-correctamente' into 'develop'

Ent 12139 16339 llamada api new agent no funciona correctamente

See merge request artica/pandorafms!6509
This commit is contained in:
Rafael Ameijeiras 2024-01-18 13:37:52 +00:00
commit c98e773cb3
1 changed files with 2 additions and 2 deletions

View File

@ -2016,7 +2016,7 @@ function api_set_new_agent($id_node, $thrash2, $other, $trhash3, $return=false,
}
returnError('No agent alias specified');
} else if (agents_get_agent_id($nombre_agente)) {
} else if (agents_get_agent_id($agent->nombre())) {
if ($message === true) {
return 'The agent name already exists in DB.';
}
@ -2064,7 +2064,7 @@ function api_set_new_agent($id_node, $thrash2, $other, $trhash3, $return=false,
}
}
if ($return === false) {
if ($return !== true) {
returnData(
'string',
[