mirror of https://github.com/MISP/MISP
chg: [analystData:API] Automatically encapsulate request's data into the analystType
parent
309242f358
commit
77a114673a
|
@ -320,6 +320,11 @@ class AnalystDataController extends AppController
|
|||
$this->AnalystData = $this->{$vt};
|
||||
$this->modelClass = $vt;
|
||||
$this->{$vt}->current_user = $this->Auth->user();
|
||||
if (!empty($this->request->data)) {
|
||||
if (!isset($this->request->data[$type])) {
|
||||
$this->request->data = [$type => $this->request->data];
|
||||
}
|
||||
}
|
||||
return $vt;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue