This repository was archived by the owner on Feb 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -65,19 +65,6 @@ protected function findOrMakeStatisticForAppId($appId): Statistic
6565 return $ this ->statistics [$ appId ];
6666 }
6767
68- protected function getUrl (): string
69- {
70- $ action = [WebSocketStatisticsEntriesController::class, 'store ' ];
71-
72- $ overridenUrl = config ('websockets.statistics.base_url_override ' );
73-
74- if ($ overridenUrl ) {
75- return $ overridenUrl .action ($ action , [], false );
76- }
77-
78- return action ($ action );
79- }
80-
8168 public function save ()
8269 {
8370 foreach ($ this ->statistics as $ appId => $ statistic ) {
@@ -92,7 +79,7 @@ public function save()
9279 $ this
9380 ->browser
9481 ->post (
95- $ this ->getUrl (),
82+ $ this ->storeStatisticsUrl (),
9683 ['Content-Type ' => 'application/json ' ],
9784 stream_for (json_encode ($ postData ))
9885 );
@@ -101,4 +88,17 @@ public function save()
10188 $ statistic ->reset ($ currentConnectionCount );
10289 }
10390 }
91+
92+ protected function storeStatisticsUrl (): string
93+ {
94+ $ action = [WebSocketStatisticsEntriesController::class, 'store ' ];
95+
96+ $ overridenUrl = config ('websockets.statistics.base_url_override ' );
97+
98+ if ($ overridenUrl ) {
99+ return $ overridenUrl .action ($ action , [], false );
100+ }
101+
102+ return action ($ action );
103+ }
104104}
You can’t perform that action at this time.
0 commit comments