* [apiv2] Fix checkObjectExists

This commit is contained in:
朱金勇
2026-01-04 13:20:54 +08:00
committed by Gitfox
parent 3235a07280
commit 313111f809
+7 -1
View File
@@ -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;