chg: No need to encapsulate data in API request

pull/5066/head
Pierre-Jean Grenier 2019-08-27 10:52:29 +02:00
parent cdc4b2ccdd
commit 74c019f8c5
1 changed files with 3 additions and 0 deletions

View File

@ -67,6 +67,9 @@ class EventBlacklistsController extends AppController
public function massDelete()
{
if ($this->request->is('post') || $this->request->is('put')) {
if (!isset($this->request->data['EventBlacklist'])) {
$this->request->data = array('EventBlacklist' => $this->request->data);
}
$ids = $this->request->data['EventBlacklist']['ids'];
$event_ids = json_decode($ids, true);
if (empty($event_ids)) {