Пример #1
0
 /**
  * Comment the test
  */
 public function comment()
 {
     $code = 200;
     $comment = $this->getRequestParameter('comment');
     try {
         $serviceContext = $this->getServiceContext();
         $result = $this->runnerService->comment($serviceContext, $comment);
         $response = ['success' => $result];
     } catch (common_Exception $e) {
         $response = $this->getErrorResponse($e);
         $code = $this->getErrorCode($e);
     }
     $this->returnJson($response, $code);
 }