* Return id when create object by API.

This commit is contained in:
holan20180123
2021-05-12 16:08:50 +08:00
parent c5ac6e1bbe
commit fcb0176f3c
3 changed files with 10 additions and 7 deletions
+2 -1
View File
@@ -57,8 +57,9 @@ class group extends control
{
if(!empty($_POST))
{
$this->group->create();
$groupID = $this->group->create();
if(dao::isError()) die(js::error(dao::getError()));
if($this->viewType == 'json') $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $groupID));
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('group', 'browse'), 'parent'));
}