This commit is contained in:
hufangzhou
2022-03-22 10:14:18 +08:00
parent e91bf2520c
commit b3003228e0
4 changed files with 33 additions and 30 deletions
+1 -9
View File
@@ -325,16 +325,8 @@ class api extends control
return $this->sendSuccess(array('locate' => $this->createLink('api', 'index', "libID=$libID")));
}
$lib = fixer::input('post')
->join('groups', ',')
->join('users', ',')
->get();
if($lib->acl == 'private') $lib->users = $this->app->user->account;
if($lib->acl == 'custom' && strpos($lib->users, $this->app->user->account) === false) $lib->users .= ',' . $this->app->user->account;
/* save api doc library */
$libID = $this->doc->createApiLib($lib);
$libID = $this->doc->createApiLib();
if(dao::isError())
{
return $this->sendError(dao::getError());