改进 header 里面增加 user_id

This commit is contained in:
iVampireSP.com 2022-11-23 16:47:34 +08:00
parent f9d123326c
commit 84f5da51a1
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -106,6 +106,10 @@ public function request($method, $path, $requests): array
$http = Http::module($this->api_token, $this->url); $http = Http::module($this->api_token, $this->url);
$http->withHeaders([
'X-User-id' => $user->id,
]);
$requests['user_id'] = $user->id; $requests['user_id'] = $user->id;
if ($method == 'post') { if ($method == 'post') {