mirror of
https://github.com/v2board/v2board.git
synced 2025-01-10 16:19:10 +08:00
update
This commit is contained in:
parent
2ce6822899
commit
f0f023f540
@ -42,6 +42,8 @@ class ServerController extends Controller
|
||||
$server->tls = $request->input('tls');
|
||||
$server->tags = $request->input('tags') ? json_encode($request->input('tags')) : NULL;
|
||||
$server->rate = $request->input('rate');
|
||||
$server->network = $request->input('network');
|
||||
$server->settings = $request->input('settings');
|
||||
return response([
|
||||
'data' => $server->save()
|
||||
]);
|
||||
|
@ -21,7 +21,9 @@ class ServerSave extends FormRequest
|
||||
'server_port' => 'required',
|
||||
'tls' => 'required',
|
||||
'tags' => 'array',
|
||||
'rate' => 'required|numeric'
|
||||
'rate' => 'required|numeric',
|
||||
'network' => 'required|in:tcp,mkcp,websocket,http2,domainsocket,quic',
|
||||
'settings' => 'json'
|
||||
];
|
||||
}
|
||||
|
||||
@ -37,7 +39,10 @@ class ServerSave extends FormRequest
|
||||
'tls.required' => 'TLS不能为空',
|
||||
'tags.array' => '标签格式不正确',
|
||||
'rate.required' => '倍率不能为空',
|
||||
'rate.numeric' => '倍率格式不正确'
|
||||
'rate.numeric' => '倍率格式不正确',
|
||||
'network.required' => '传输协议不能为空',
|
||||
'network.in' => '传输协议格式不正确',
|
||||
'settings.json' => '传输协议配置格式不正确'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user