Merge branch 'sprint/167_tianshujie_15638' into 'sprint/167'

* Fix bug #15638.

See merge request easycorp/zentaopms!115
This commit is contained in:
李玉春
2021-10-19 12:40:58 +00:00
5 changed files with 32 additions and 6 deletions
+6 -3
View File
@@ -427,10 +427,13 @@ class api extends control
->setDefault('product,module', 0)
->get();
$this->api->update($apiID, $params);
if(dao::isError())
$changes = $this->api->update($apiID, $params);
if(dao::isError()) return $this->sendError(dao::getError());
if($changes)
{
return $this->sendError(dao::getError());
$actionID = $this->action->create('api', $apiID, 'edited');
$this->action->logHistory($actionID, $changes);
}
return $this->sendSuccess(array('locate' => helper::createLink('api', 'index', "libID=0&moduleID=0&apiID=$apiID")));