ciresults.php 889 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * The ciresults entry point of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Chunsheng Wang <chunsheng@cnezsoft.com>
  8. * @package entries
  9. * @version 1
  10. * @link https://www.zentao.net
  11. */
  12. class ciresultsEntry extends entry
  13. {
  14. /**
  15. * POST method.
  16. *
  17. * @access public
  18. * @return string
  19. */
  20. public function post()
  21. {
  22. $control = $this->loadController('ci', 'commitResult');
  23. $control->commitResult();
  24. $data = $this->getData();
  25. if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
  26. return $this->sendSuccess(200, 'success');
  27. }
  28. }