OMEGA\ericyh.huang 1 year ago
parent
commit
d39ce01264
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/be/app/Http/Controllers/HealthyPassPortController.php

+ 3
- 1
src/be/app/Http/Controllers/HealthyPassPortController.php View File

@@ -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