* [apiv2] Fix checkObjectExists
This commit is contained in:
@@ -516,11 +516,15 @@ class api extends router
|
||||
if($this->apiVersion == 'v2')
|
||||
{
|
||||
$this->setParams();
|
||||
|
||||
if(in_array($this->action, array('post', 'put', 'delete')))
|
||||
{
|
||||
$this->checkObjectExists();
|
||||
$this->setFormData();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->checkObjectExists();
|
||||
}
|
||||
|
||||
return parent::loadModule();
|
||||
}
|
||||
@@ -584,6 +588,8 @@ class api extends router
|
||||
if(isset($this->params[$key])) $this->params[$key] = $value;
|
||||
}
|
||||
|
||||
$this->checkObjectExists();
|
||||
|
||||
/* 其他方法不需要从GET页面获取post data。Other request directly. */
|
||||
if(!in_array($this->methodName, ['create', 'edit'])) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user