Merge branch 'Añadir-campo-estado-de-agente-en-la-llamada-API-get-all-agent-3' into 'develop'

Fix id for agent status - #2881

See merge request artica/pandorafms!1846
This commit is contained in:
vgilc 2018-10-09 17:27:52 +02:00
commit 5197c64f67

View File

@ -1756,12 +1756,12 @@ function api_get_all_agents($thrash1, $thrash2, $other, $returnType) {
}
foreach ($result_agents as $key => $value) {
$result_agents[$key]['status'] = agents_get_status($agent['id_agente'], true);
$result_agents[$key]['status'] = agents_get_status($result_agents[$key]['id_agente'], true);
}
if (count($result_agents) > 0 and $result_agents !== false) {
$data = array('type' => 'array', 'data' => $result_agents);
returnData($returnType, $data, $separator);
return json_encode($data['data']);
}
else {
returnError('error_all_agents', 'No agents retrieved.');