|
@@ -3,6 +3,7 @@
|
|
|
namespace App\Http\Middleware;
|
|
|
|
|
|
use App\Modules\User\Services\QappUserService;
|
|
|
+use App\Modules\User\Services\UserService;
|
|
|
use Closure;
|
|
|
use Illuminate\Http\Request;
|
|
|
use Tymon\JWTAuth\Exceptions\JWTException;
|
|
@@ -28,6 +29,10 @@ class QuickAppGetUserFromToken extends BaseMiddleware
|
|
|
try {
|
|
|
$user = $this->auth->authenticate($token);
|
|
|
QappUserService::setGolableUserStatic($user->id);
|
|
|
+ $send_order_id = $request->header('send_order_id', 0);
|
|
|
+ if ($send_order_id) {
|
|
|
+ UserService::setUserSendOrderStatic($user->id, $send_order_id);
|
|
|
+ }
|
|
|
} catch (TokenExpiredException $e) {
|
|
|
return response()->error('QAPP_TOKEN_ERROR');
|
|
|
} catch (JWTException $e) {
|