OMEGA\ericyh.huang пре 1 година
родитељ
комит
d39ce01264
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3
    1
      src/be/app/Http/Controllers/HealthyPassPortController.php

+ 3
- 1
src/be/app/Http/Controllers/HealthyPassPortController.php Прегледај датотеку

32
 
32
 
33
     public function profile(Request $request){
33
     public function profile(Request $request){
34
         $profile = Survey::where('line_user_id',$request->lineUserId)->first();
34
         $profile = Survey::where('line_user_id',$request->lineUserId)->first();
35
-        $profile->filler_content = json_decode($profile->filler_content, true);
35
+        if(!empty($profile->id)){
36
+            $profile->filler_content = json_decode($profile->filler_content, true);
37
+        }
36
         return response()->json(["data" => $profile] );
38
         return response()->json(["data" => $profile] );
37
     }
39
     }
38
 
40