*PUT->POST.

This commit is contained in:
songchenxuan
2022-03-18 14:14:10 +08:00
parent 96f9a08196
commit 84a7e1ad4c
8 changed files with 16 additions and 55 deletions

View File

@@ -12,15 +12,15 @@
class storyActiveEntry extends Entry
{
/**
/**
* POST method.
*
* @param int $storyID
* @access public
* @return void
*/
public function put($storyID)
{
public function post($storyID)
{
$oldStory = $this->loadModel('story')->getByID($storyID);
$fields = 'assignedTo,status,comment';
@@ -37,6 +37,6 @@ class storyActiveEntry extends Entry
$story = $this->loadModel('story')->getByID($storyID);
$this->send(200, $story);
}
}
}

View File

@@ -12,13 +12,13 @@
class storyAssignToEntry extends Entry
{
/**
* PUT method.
* POST method.
*
* @param int $storyID
* @access public
* @return void
*/
public function put($storyID)
public function post($storyID)
{
$task = $this->loadModel('story')->getByID($storyID);

View File

@@ -12,13 +12,13 @@
class storyCloseEntry extends Entry
{
/**
* PUT method.
* POST method.
*
* @param int $storyID
* @access public
* @return void
*/
public function put($storyID)
public function post($storyID)
{
$story = $this->loadModel('story')->getByID($storyID);

View File

@@ -1,39 +0,0 @@
<?php
/**
* The story recordEstimate entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class storyRecordEstimateEntry extends Entry
{
/**
* POST method.
*
* @param int $storyID
* @access public
* @return void
*/
public function post($storyID)
{
$story = $this->loadModel('story')->getByID($storyID);
$fields = 'closedReason,duplicateStory,childStories,comment';
$this->batchSetPost($fields);
$control = $this->loadController('story', 'close');
$control->close($storyID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$story = $this->story->getByID($storyID);
$this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
}
}

View File

@@ -12,13 +12,13 @@
class taskCloseEntry extends Entry
{
/**
* PUT method.
* POST method.
*
* @param int $taskID
* @access public
* @return void
*/
public function put($taskID)
public function post($taskID)
{
$task = $this->loadModel('task')->getByID($taskID);

View File

@@ -12,13 +12,13 @@
class taskFinishEntry extends Entry
{
/**
* PUT method.
* POST method.
*
* @param int $taskID
* @access public
* @return void
*/
public function put($taskID)
public function post($taskID)
{
$task = $this->loadModel('task')->getByID($taskID);

View File

@@ -12,13 +12,13 @@
class taskPauseEntry extends Entry
{
/**
* PUT method.
* POST method.
*
* @param int $taskID
* @access public
* @return void
*/
public function put($taskID)
public function post($taskID)
{
$task = $this->loadModel('task')->getByID($taskID);

View File

@@ -12,13 +12,13 @@
class taskStartEntry extends Entry
{
/**
* PUT method.
* POST method.
*
* @param int $taskID
* @access public
* @return void
*/
public function put($taskID)
public function post($taskID)
{
$task = $this->loadModel('task')->getByID($taskID);