fix: [usersStat] allow fetching json of statistics/users

pull/3556/head
Sami Mokaddem 2018-08-13 11:32:27 +00:00
parent e01f481c63
commit 212c11290d
1 changed files with 6 additions and 2 deletions

View File

@ -1731,8 +1731,12 @@ class UsersController extends AppController
$statistics[$scope]['data'][$range] = $this->{$scope_data['model']}->find('count', $params);
}
}
$this->set('statistics', $statistics);
$this->render('statistics_users');
if ($this->_isRest()) {
return $this->RestResponse->viewData($statistics, $this->response->type());
} else {
$this->set('statistics', $statistics);
$this->render('statistics_users');
}
}
public function tagStatisticsGraph()