Bladeren bron

moderna sent msg module after survey

OMEGA\ericyh.huang 1 jaar geleden
bovenliggende
commit
423699867c
1 gewijzigde bestanden met toevoegingen van 2 en 13 verwijderingen
  1. 2
    13
      src/be/app/Http/Controllers/HealthyPassPortController.php

+ 2
- 13
src/be/app/Http/Controllers/HealthyPassPortController.php Bestand weergeven

@@ -90,8 +90,9 @@ class HealthyPassPortController extends Controller
90 90
             //確認完成填寫問卷後,建立完成問券標籤
91 91
             $buildActions = [];
92 92
             array_push($buildActions, $this->buildActionsRequest("addTag", config("botApi.doneSurvey")));
93
-            // array_push($buildActions, $this->buildActionsRequest("setMenu", config("botApi.setMenuDoneSurvey")));
93
+            array_push($buildActions, $this->buildActionsRequest("setMenu", config("botApi.setMenuDoneSurvey")));
94 94
             $this->botActionsSend($lineUserId,$buildActions);
95
+
95 96
             //儲存填寫資料
96 97
             if(empty($survey_data->id)){
97 98
                 $survey_data = new Survey();
@@ -101,18 +102,6 @@ class HealthyPassPortController extends Controller
101 102
             $survey_data->nickname = $healthNickname;
102 103
             $survey_data->filler_content = json_encode($survey_fill_content);
103 104
             $survey_data->save();
104
-            // //完成推送訊息
105
-            $client = new Client();
106
-            $res_users = $client->request('POST', 'https://api.botbonnie.com/v2/message/push',[
107
-                'headers'=>$this->api_header,
108
-                'json' => [
109
-                    'userId' => $lineUserId,
110
-                    'pageId' => config('botApi.lineOAId'),
111
-                    'platform' => 1,
112
-                    'moduleId' => 'module-_z7jnxoF4P'
113
-                ]
114
-            ]);
115
-            // $statusCode = $res_users->getStatusCode();
116 105
             return  response()->json(["result" => 'successed']);
117 106
         }else{
118 107
             return response()->json(["result" => 'failed'] );