new: [internal] New ability to get JSON data from event preview

pull/6874/head
Jakub Onderka 2021-01-18 10:13:11 +01:00
parent 2bdaa351ad
commit 56ef2f9874
1 changed files with 4 additions and 0 deletions

View File

@ -164,6 +164,10 @@ class ServersController extends AppController
$this->redirect(array('action' => 'previewIndex', $serverId));
}
if ($this->_isRest()) {
return $this->RestResponse->viewData($event, $this->response->type());
}
$this->loadModel('Warninglist');
if (isset($event['Event']['Attribute'])) {
$this->Warninglist->attachWarninglistToAttributes($event['Event']['Attribute']);