mirror of https://github.com/MISP/MISP
chg: Setting the 'Tag' key when editing a tag through API is not mandatory (consistency)
parent
9bef0560fc
commit
851cfb84e4
|
@ -289,6 +289,9 @@ class TagsController extends AppController
|
|||
throw new NotFoundException('You don\'t have permission to do that.');
|
||||
}
|
||||
if ($this->request->is('post') || $this->request->is('put')) {
|
||||
if (!isset($this->request->data['Tag'])) {
|
||||
$this->request->data = array('Tag' => $this->request->data);
|
||||
}
|
||||
$this->request->data['Tag']['id'] = $id;
|
||||
if ($this->Tag->save($this->request->data)) {
|
||||
if ($this->_isRest()) {
|
||||
|
|
Loading…
Reference in New Issue