Exemplo n.º 1
0
 public function emptyTrash()
 {
     ipRequest()->mustBePost();
     $data = ipRequest()->getPost();
     if (!isset($data['pages'])) {
         throw new \Ip\Exception('Missing required parameters');
     }
     $data['pages'] = explode('|', $data['pages']);
     unset($data['pages'][0]);
     \Ip\Internal\Pages\Service::emptyTrash($data['pages']);
     $answer = array('status' => 'success');
     return new \Ip\Response\Json($answer);
 }