Merge branch '2881-Añadir-campo-de-estado-de-agente-en-la-llamada-API-get_all_agents' into 'develop'

Add status data to get_all_agents API response - #2881

See merge request artica/pandorafms!1835
This commit is contained in:
vgilc 2018-10-08 13:24:35 +02:00
commit 11679461cd
1 changed files with 4 additions and 0 deletions

View File

@ -1747,6 +1747,10 @@ function api_get_all_agents($thrash1, $thrash2, $other, $returnType) {
$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) {
$data = array('type' => 'array', 'data' => $result_agents);
returnData($returnType, $data, $separator);