diff --git a/src/API/Controller.php b/src/API/Controller.php index 4647ad4534..c413e9c1bf 100644 --- a/src/API/Controller.php +++ b/src/API/Controller.php @@ -215,7 +215,7 @@ protected function handleRequest(ConnectionInterface $connection) */ protected function sendAndClose(ConnectionInterface $connection, $response) { - tap($connection)->send(JsonResponse::create($response))->close(); + tap($connection)->send(new JsonResponse($response))->close(); } /**