mirror of https://github.com/MISP/MISP
fix: [usersStat] allow fetching json of statistics/users
parent
e01f481c63
commit
212c11290d
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue