改进 Module Export 请求

This commit is contained in:
iVampireSP.com 2022-12-19 14:47:06 +08:00
parent 504dd963bd
commit 60f3480aa0
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -129,13 +129,13 @@ public function moduleRequest($method, $path, $requests): array
{
$module_id = auth('module')->id();
$this->http()->withHeaders([
$http = $this->http()->withHeaders([
'X-Module' => $module_id
]);
$requests['module_id'] = $module_id;
$response = $this->http()->{$method}("exports/{$path}", $requests);
$response = $http->{$method}("exports/{$path}", $requests);
return $this->getResponse($response);
}