| xqd
@@ -190,8 +190,8 @@ class UserController extends Controller
|
|
|
try {
|
|
|
$user = auth('api')->user();
|
|
|
$userinfo = DB::table('users_info')->where(['user_id'=>$user->id])->select('photo','video')->first();
|
|
|
- $userinfo->photo = json_decode($userinfo->photo,true);
|
|
|
- $userinfo->video = json_decode($userinfo->video,true);
|
|
|
+ $userinfo->photo = !empty($userinfo->photo)?json_decode($userinfo->photo,true):[];
|
|
|
+ $userinfo->video = !empty($userinfo->video)?json_decode($userinfo->video,true):[];
|
|
|
}catch (\Exception $exception){
|
|
|
return $this->response->errorForbidden($exception->getMessage());
|
|
|
}
|