Commit e3d0ad36 by haojie

1

parent 4e56c9b8
......@@ -137,10 +137,10 @@ public function prompt_callback($data = [])
{
$credentials = Arr::only($data, ['user_id', 'task_id', 'result_img', 'prompt_id', 'message']);
# 必须字段
$prompt_id = $credentials['prompt_id'];
$user_id = $credentials['user_id'];
$task_id = $credentials['task_id'];
$result_img = $credentials['result_img'];
$prompt_id = $credentials['prompt_id'] ?? '';
$user_id = $credentials['user_id'] ?? '';
$task_id = $credentials['task_id'] ?? '';
$result_img = $credentials['result_img'] ?? '';
$message = $credentials['message'] ?? '';
# 判断必须字段
if (empty($user_id) || empty($task_id) || empty($result_img) || empty($prompt_id)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment