* Adjust the params of createDemoData when manual import.

This commit is contained in:
hufangzhou
2021-12-27 11:36:46 +08:00
parent 2529f1b487
commit b7ca55d9ca
2 changed files with 2 additions and 2 deletions

View File

@@ -321,7 +321,7 @@ class api extends control
{
if($type == 'demo')
{
$libID = $this->api->createDemoData();
$libID = $this->api->createDemoData($this->post->name, $this->post->baseUrl);
return $this->sendSuccess(array('locate' => $this->createLink('api', 'index', "libID=$libID")));
}

View File

@@ -741,7 +741,7 @@ class apiModel extends model
* @access public
* @return int
*/
public function createDemoData($name, $baseUrl, $version)
public function createDemoData($name, $baseUrl, $version = '16.0')
{
$firstAccount = $this->dao->select('account')->from(TABLE_USER)->orderBy('id_asc')->limit(1)->fetch('account');
$currentAccount = isset($this->app->user->account) ? $this->app->user->account : $firstAccount;