Add status data to get_all_agents API response - #2881

This commit is contained in:
enriquecd 2018-10-05 12:57:25 +02:00
parent 740a7f0327
commit c0dd2bcab6

View File

@ -1747,6 +1747,10 @@ function api_get_all_agents($thrash1, $thrash2, $other, $returnType) {
$result_agents = $all_agents; $result_agents = $all_agents;
} }
foreach ($result_agents as $key => $value) {
$result_agents[$key]['status'] = agents_get_status($agent['id_agente'], true);
}
if (count($result_agents) > 0 and $result_agents !== false) { if (count($result_agents) > 0 and $result_agents !== false) {
$data = array('type' => 'array', 'data' => $result_agents); $data = array('type' => 'array', 'data' => $result_agents);
returnData($returnType, $data, $separator); returnData($returnType, $data, $separator);