This commit is contained in:
root 2019-11-06 01:01:46 +08:00
parent 129e203634
commit 9345c9c807

View File

@ -43,7 +43,10 @@ class ServerController extends Controller
$server->tags = $request->input('tags') ? json_encode($request->input('tags')) : NULL;
$server->rate = $request->input('rate');
$server->network = $request->input('network');
if ($request->input('settings') && is_object(json_decode($request->input('settings')))) {
if ($request->input('settings')) {
if (!is_object(json_decode($request->input('settings')))) {
abort(500, '传输协议配置格式不正确');
}
$server->settings = $request->input('settings');
}
return response([