mirror of
https://github.com/easychen/pushdeer.git
synced 2025-01-10 15:05:27 +08:00
修正输入值的必填规则
This commit is contained in:
parent
3c5108da72
commit
ff21e69382
@ -22,9 +22,9 @@ class PushDeerDeviceController extends Controller
|
||||
{
|
||||
$validated = $request->validate(
|
||||
[
|
||||
'name' => 'string',
|
||||
'device_id' => 'string',
|
||||
'is_clip' => 'integer',
|
||||
'name' => 'string|required',
|
||||
'device_id' => 'string|required',
|
||||
'is_clip' => 'integer|nullable',
|
||||
'type' => 'string|nullable',
|
||||
]
|
||||
);
|
||||
@ -55,8 +55,8 @@ class PushDeerDeviceController extends Controller
|
||||
{
|
||||
$validated = $request->validate(
|
||||
[
|
||||
'id' => 'integer',
|
||||
'name' =>'string'
|
||||
'id' => 'integer|required',
|
||||
'name' =>'string|required'
|
||||
]
|
||||
);
|
||||
|
||||
@ -75,7 +75,7 @@ class PushDeerDeviceController extends Controller
|
||||
{
|
||||
$validated = $request->validate(
|
||||
[
|
||||
'id' => 'integer',
|
||||
'id' => 'integer|required',
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -40,8 +40,8 @@ class PushDeerKeyController extends Controller
|
||||
{
|
||||
$validated = $request->validate(
|
||||
[
|
||||
'id' => 'integer',
|
||||
'name' =>'string'
|
||||
'id' => 'integer|required',
|
||||
'name' =>'string|required'
|
||||
]
|
||||
);
|
||||
|
||||
@ -60,7 +60,7 @@ class PushDeerKeyController extends Controller
|
||||
{
|
||||
$validated = $request->validate(
|
||||
[
|
||||
'id' => 'integer',
|
||||
'id' => 'integer|required',
|
||||
]
|
||||
);
|
||||
|
||||
@ -79,7 +79,7 @@ class PushDeerKeyController extends Controller
|
||||
{
|
||||
$validated = $request->validate(
|
||||
[
|
||||
'id' => 'integer',
|
||||
'id' => 'integer|required',
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -96,7 +96,7 @@ class PushDeerMessageController extends Controller
|
||||
{
|
||||
$validated = $request->validate(
|
||||
[
|
||||
'id' => 'integer',
|
||||
'id' => 'integer|required',
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -60,7 +60,7 @@ class PushDeerUserController extends Controller
|
||||
{
|
||||
$validated = $request->validate(
|
||||
[
|
||||
'code' => 'string',
|
||||
'code' => 'string|required',
|
||||
]
|
||||
);
|
||||
|
||||
@ -115,7 +115,7 @@ class PushDeerUserController extends Controller
|
||||
{
|
||||
$validated = $request->validate(
|
||||
[
|
||||
'idToken' => 'string',
|
||||
'idToken' => 'string|required',
|
||||
]
|
||||
);
|
||||
|
||||
@ -157,11 +157,12 @@ class PushDeerUserController extends Controller
|
||||
{
|
||||
$validated = $request->validate(
|
||||
[
|
||||
'tokenorcode' => 'string',
|
||||
'type' => 'string', // apple or wechat
|
||||
'tokenorcode' => 'string|required',
|
||||
'type' => 'string|required', // apple or wechat
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$type_field = strtolower($validated['type']) == 'apple' ? 'apple_id' : 'wechat_id';
|
||||
|
||||
$identiy_string = false;
|
||||
|
Loading…
Reference in New Issue
Block a user