kyle 2 lat temu
rodzic
commit
ebe4113bc6
1 zmienionych plików z 7 dodań i 7 usunięć
  1. 7
    7
      app/Http/Controllers/Web/Api2021Controller.php

+ 7
- 7
app/Http/Controllers/Web/Api2021Controller.php Wyświetl plik

223
 //        ]);
223
 //        ]);
224
 
224
 
225
         // 業務驗證(是否加入LINE帳號的好友) [不存在 cookie 的時候就要進直通查詢,造成每天只要最多一次查詢就好]
225
         // 業務驗證(是否加入LINE帳號的好友) [不存在 cookie 的時候就要進直通查詢,造成每天只要最多一次查詢就好]
226
-//        if (!Cookie::get('gamecc')) {
226
+        if (!Cookie::get('gamecc')) {
227
 //        if (false) { // testonly
227
 //        if (false) { // testonly
228
-        if (!$this->aSv->isAuthUserExists($lineId)) { // testonly 用資料庫檢查
228
+//        if (!$this->aSv->isAuthUserExists($lineId)) { // testonly 用資料庫檢查
229
             if (!$this->aSv->lineFriendCheck($lineId)) {
229
             if (!$this->aSv->lineFriendCheck($lineId)) {
230
                 $this->sisLog['memoIn'] = json_encode(['error' => 'logical'], JSON_UNESCAPED_UNICODE);
230
                 $this->sisLog['memoIn'] = json_encode(['error' => 'logical'], JSON_UNESCAPED_UNICODE);
231
                 $this->sisLog['memoOut'] = json_encode(['msg' => '請先加入 LINE 好友'], JSON_UNESCAPED_UNICODE);
231
                 $this->sisLog['memoOut'] = json_encode(['msg' => '請先加入 LINE 好友'], JSON_UNESCAPED_UNICODE);
232
 
232
 
233
                 return response()->json(["succ" => false, "err" => '請先加入 LINE 好友']);
233
                 return response()->json(["succ" => false, "err" => '請先加入 LINE 好友']);
234
             }
234
             }
235
-            else { // testonly 用資料庫檢查
236
-                $this->aSv->addAuthUser($lineId);
237
-            }
235
+//            else { // testonly 用資料庫檢查
236
+//                $this->aSv->addAuthUser($lineId);
237
+//            }
238
         }
238
         }
239
 
239
 
240
         // 業務邏輯(檢查有無本地資料,沒有就新增,順便取得個人資訊包含吉點)
240
         // 業務邏輯(檢查有無本地資料,沒有就新增,順便取得個人資訊包含吉點)
287
         $this->sisLog['memoOut'] = '';
287
         $this->sisLog['memoOut'] = '';
288
 
288
 
289
         // 業務驗證(是否加入LINE帳號的好友) [不存在 cookie 的時候就要進直通查詢,造成每天只要最多一次查詢就好]
289
         // 業務驗證(是否加入LINE帳號的好友) [不存在 cookie 的時候就要進直通查詢,造成每天只要最多一次查詢就好]
290
-        if (false) { // testonly
291
-//        if (!Cookie::get('gamecc')) {
290
+//        if (false) { // testonly
291
+        if (!Cookie::get('gamecc')) {
292
             if (!$this->aSv->lineFriendCheck($lineId)) {
292
             if (!$this->aSv->lineFriendCheck($lineId)) {
293
                 $this->sisLog['memoIn'] = json_encode(['error' => 'logical'], JSON_UNESCAPED_UNICODE);
293
                 $this->sisLog['memoIn'] = json_encode(['error' => 'logical'], JSON_UNESCAPED_UNICODE);
294
                 $this->sisLog['memoOut'] = json_encode(['msg' => '請先加入 LINE 好友'], JSON_UNESCAPED_UNICODE);
294
                 $this->sisLog['memoOut'] = json_encode(['msg' => '請先加入 LINE 好友'], JSON_UNESCAPED_UNICODE);