mirror of
https://github.com/easychen/pushdeer.git
synced 2025-01-10 06:55:45 +08:00
add device type
This commit is contained in:
parent
93024fd028
commit
9506384550
@ -25,6 +25,7 @@ class PushDeerDeviceController extends Controller
|
|||||||
'name' => 'string',
|
'name' => 'string',
|
||||||
'device_id' => 'string',
|
'device_id' => 'string',
|
||||||
'is_clip' => 'integer',
|
'is_clip' => 'integer',
|
||||||
|
'type' => 'string|nullable',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -33,10 +34,15 @@ class PushDeerDeviceController extends Controller
|
|||||||
return send_error('uid错误', ErrorCode('ARGS'));
|
return send_error('uid错误', ErrorCode('ARGS'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$type = 'ios';
|
||||||
|
if (strlen($validated['type']) > 0) {
|
||||||
|
$type = trim($validated['type']);
|
||||||
|
}
|
||||||
|
|
||||||
$the_device = [];
|
$the_device = [];
|
||||||
$the_device['uid'] = $uid;
|
$the_device['uid'] = $uid;
|
||||||
$the_device['name'] = $validated['name'];
|
$the_device['name'] = $validated['name'];
|
||||||
$the_device['type'] = 'all';
|
$the_device['type'] = $type;
|
||||||
$the_device['is_clip'] = intval($validated['is_clip']);
|
$the_device['is_clip'] = intval($validated['is_clip']);
|
||||||
$the_device['device_id'] = $validated['device_id'];
|
$the_device['device_id'] = $validated['device_id'];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user