From 84f5da51a18d409c558349afd20e1e8cf6331962 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Wed, 23 Nov 2022 16:47:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=20header=20=E9=87=8C?= =?UTF-8?q?=E9=9D=A2=E5=A2=9E=E5=8A=A0=20user=5Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Module.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Models/Module.php b/app/Models/Module.php index 0f1c14f..96becb2 100644 --- a/app/Models/Module.php +++ b/app/Models/Module.php @@ -106,6 +106,10 @@ public function request($method, $path, $requests): array $http = Http::module($this->api_token, $this->url); + $http->withHeaders([ + 'X-User-id' => $user->id, + ]); + $requests['user_id'] = $user->id; if ($method == 'post') {