🐛 修复 BUG

This commit is contained in:
WispX
2020-03-02 07:34:20 +08:00
parent 94f9f83cf2
commit c56dc34a94
+7 -1
View File
@@ -15,7 +15,13 @@ class Upload extends Base
{
public function initialize()
{
if (!$this->config['open_api']) {
$config = [];
$configs = \app\common\model\Config::all();
foreach ($configs as $key => &$value) {
$config[$value->name] = $value->value;
}
if (!$config['open_api']) {
$this->response('API is not open yet.', [], 500);
}