Esempio n. 1
0
 /**
  * Post controller for edit feedback
  *
  * @return array|bool|string
  */
 public function editAction()
 {
     $data = PostRequest::post();
     $response = array();
     if (!isset($data->id)) {
         $response['error'] = self::ERROR_ID_IS_REQUIRED;
         return $response;
     }
     if (!isset($data->message)) {
         $response['error'] = self::ERROR_MESSAGE_IS_REQUIRED;
         return $response;
     }
     $response = Feedback::edit($data->id, $data->message);
     return $response;
 }