diff --git a/src/Statistics/Http/Middleware/Authorize.php b/src/Statistics/Http/Middleware/Authorize.php deleted file mode 100644 index 4611dc5..0000000 --- a/src/Statistics/Http/Middleware/Authorize.php +++ /dev/null @@ -1,17 +0,0 @@ -key); - - return is_null($app) || $app->secret !== $request->secret - ? abort(403) - : $next($request); - } -} diff --git a/tests/Statistics/Controllers/WebSocketsStatisticsControllerTest.php b/tests/Statistics/Controllers/WebSocketsStatisticsControllerTest.php deleted file mode 100644 index beede8a..0000000 --- a/tests/Statistics/Controllers/WebSocketsStatisticsControllerTest.php +++ /dev/null @@ -1,38 +0,0 @@ -post( - action([WebSocketStatisticsEntriesController::class, 'store']), - array_merge($this->payload(), [ - 'key' => config('websockets.apps.0.key'), - 'secret' => config('websockets.apps.0.secret'), - ]) - ); - - $entries = WebSocketsStatisticsEntry::get(); - - $this->assertCount(1, $entries); - - $this->assertArrayHasKey('app_id', $entries->first()->attributesToArray()); - } - - protected function payload(): array - { - return [ - 'app_id' => config('websockets.apps.0.id'), - 'peak_connection_count' => 1, - 'websocket_message_count' => 2, - 'api_message_count' => 3, - ]; - } -}