* api: refactor the createStruct page by zin.

This commit is contained in:
liugang
2023-08-07 16:23:55 +08:00
parent 01ce2f1693
commit 5f2bde661b
2 changed files with 150 additions and 7 deletions
+4 -7
View File
@@ -365,16 +365,13 @@ class api extends control
if(!empty($_POST))
{
$now = helper::now();
$userId = $this->app->user->account;
$data = fixer::input('post')
$data = fixer::input('post')
->trim('name')
->add('lib', $libID)
->add('addedBy', $this->app->user->account)
->add('addedDate', helper::now())
->skipSpecial('attribute')
->add('addedBy', $userId)
->add('addedDate', $now)
->add('editedBy', $userId)
->add('editedDate', $now)
->remove('undefined')
->get();