lh 1 miesiąc temu
rodzic
commit
b925b20fac
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      app/Http/Middleware/CheckCompany.php

+ 4 - 1
app/Http/Middleware/CheckCompany.php

@@ -25,7 +25,10 @@ class CheckCompany
     {
         $params = $request->all();
         $token = $request->header('d-token', '');
-        if (!$token) Utils::throwError(ErrorConst::NOT_LOGIN);
+        if (!$token) {
+            $token = getProp($params, 'd_token');
+            if (!$token) Utils::throwError(ErrorConst::NOT_LOGIN);
+        }
 
         if (env('CHECK_COMPANY')) {
             $cpid = Site::getCpid();