mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-24 12:07:28 +08:00
refactor: rename hook form traffic.before_process to traffic.process.before
This commit is contained in:
@@ -119,11 +119,9 @@ class UserService
|
|||||||
$server->rate = $server->getCurrentRate();
|
$server->rate = $server->getCurrentRate();
|
||||||
$server = $server->toArray();
|
$server = $server->toArray();
|
||||||
|
|
||||||
list($server, $protocol, $data) = HookManager::filter('traffic.before_process', [
|
list($server, $protocol, $data) = HookManager::filter('traffic.process.before', [$server, $protocol, $data]);
|
||||||
$server,
|
// Compatible with legacy hook
|
||||||
$protocol,
|
list($server, $protocol, $data) = HookManager::filter('traffic.before_process', [$server, $protocol, $data]);
|
||||||
$data
|
|
||||||
]);
|
|
||||||
|
|
||||||
$timestamp = strtotime(date('Y-m-d'));
|
$timestamp = strtotime(date('Y-m-d'));
|
||||||
collect($data)->chunk(1000)->each(function ($chunk) use ($timestamp, $server, $protocol) {
|
collect($data)->chunk(1000)->each(function ($chunk) use ($timestamp, $server, $protocol) {
|
||||||
|
|||||||
Reference in New Issue
Block a user