Ejemplo 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;
 }
Ejemplo n.º 2
0
 public function loginAction()
 {
     $request = new LoginRequest(PostRequest::post(), true);
     return User::login($request);
 }