This commit is contained in:
2021-04-19 17:12:32 +08:00
parent 00390ce060
commit 3f82b6f772
+3 -3
View File
@@ -273,13 +273,13 @@ class Response extends HttpService
* @param null $response * @param null $response
* @return mixed * @return mixed
*/ */
public static function create($response = null): mixed public static function create($response = null): static
{ {
$ciResponse = Context::setContext('response', new Response()); $ciResponse = new Response();
$ciResponse->response = $response; $ciResponse->response = $response;
$ciResponse->startTime = microtime(true); $ciResponse->startTime = microtime(true);
$ciResponse->format = self::JSON; $ciResponse->format = self::JSON;
return $ciResponse; return Context::setContext('response', $ciResponse);
} }