OMEGA\ericyh.huang 1 år sedan
förälder
incheckning
d39ce01264
1 ändrade filer med 3 tillägg och 1 borttagningar
  1. 3
    1
      src/be/app/Http/Controllers/HealthyPassPortController.php

+ 3
- 1
src/be/app/Http/Controllers/HealthyPassPortController.php Visa fil

@@ -32,7 +32,9 @@ class HealthyPassPortController extends Controller
32 32
 
33 33
     public function profile(Request $request){
34 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 38
         return response()->json(["data" => $profile] );
37 39
     }
38 40