diff --git a/platform/AliyunFC.php b/platform/AliyunFC.php index d96330d..b3d7a77 100644 --- a/platform/AliyunFC.php +++ b/platform/AliyunFC.php @@ -121,7 +121,12 @@ function install() global $constStr; if ($_GET['install2']) { $tmp['admin'] = $_POST['admin']; - setConfig($tmp); + $response = setConfigResponse( setConfig($tmp) ); + if (api_error($response)) { + $html = api_error_msg($response); + $title = 'Error'; + return message($html, $title, 201); + } if (needUpdate()) { OnekeyUpate(); return message('update to github version, reinstall. diff --git a/platform/HuaweiFG_env.php b/platform/HuaweiFG_env.php index ffbb138..9e3af2f 100644 --- a/platform/HuaweiFG_env.php +++ b/platform/HuaweiFG_env.php @@ -145,7 +145,12 @@ function install() global $contextUserData; if ($_GET['install2']) { $tmp['admin'] = $_POST['admin']; - setConfig($tmp); + $response = setConfigResponse( setConfig($tmp) ); + if (api_error($response)) { + $html = api_error_msg($response); + $title = 'Error'; + return message($html, $title, 201); + } if (needUpdate()) { OnekeyUpate(); return message('update to github version, reinstall. diff --git a/platform/HuaweiFG_file.php b/platform/HuaweiFG_file.php index 37b4356..79a684c 100644 --- a/platform/HuaweiFG_file.php +++ b/platform/HuaweiFG_file.php @@ -145,7 +145,12 @@ function install() global $contextUserData; if ($_GET['install2']) { $tmp['admin'] = $_POST['admin']; - setConfig($tmp); + $response = setConfigResponse( setConfig($tmp) ); + if (api_error($response)) { + $html = api_error_msg($response); + $title = 'Error'; + return message($html, $title, 201); + } if (needUpdate()) { OnekeyUpate(); return message('update to github version, reinstall. diff --git a/platform/TencentSCF_env.php b/platform/TencentSCF_env.php index b40f319..fd4552e 100644 --- a/platform/TencentSCF_env.php +++ b/platform/TencentSCF_env.php @@ -127,7 +127,12 @@ function install() global $constStr; if ($_GET['install2']) { $tmp['admin'] = $_POST['admin']; - setConfig($tmp); + $response = setConfigResponse( setConfig($tmp) ); + if (api_error($response)) { + $html = api_error_msg($response); + $title = 'Error'; + return message($html, $title, 201); + } if (needUpdate()) { OnekeyUpate(); return message('update to github version, reinstall. diff --git a/platform/TencentSCF_file.php b/platform/TencentSCF_file.php index 7eb0948..416454a 100644 --- a/platform/TencentSCF_file.php +++ b/platform/TencentSCF_file.php @@ -137,7 +137,12 @@ function install() global $constStr; if ($_GET['install2']) { $tmp['admin'] = $_POST['admin']; - setConfig($tmp); + $response = setConfigResponse( setConfig($tmp) ); + if (api_error($response)) { + $html = api_error_msg($response); + $title = 'Error'; + return message($html, $title, 201); + } if (needUpdate()) { OnekeyUpate(); return message('update to github version, reinstall.