mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-11-30 02:37:58 +08:00
Removed useless code.
This commit is contained in:
parent
edace35f04
commit
6e1ca315ba
@ -13,7 +13,6 @@ namespace Hyperf\RpcServer\Router;
|
||||
|
||||
use FastRoute\DataGenerator;
|
||||
use FastRoute\RouteParser;
|
||||
use Hyperf\HttpServer\MiddlewareManager;
|
||||
use Hyperf\HttpServer\Router\Handler;
|
||||
|
||||
class RouteCollector
|
||||
@ -59,11 +58,8 @@ class RouteCollector
|
||||
{
|
||||
$route = $this->currentGroupPrefix . $route;
|
||||
$routeDatas = $this->routeParser->parse($route);
|
||||
$server = $options['server'] ?? 'rpc';
|
||||
foreach ($routeDatas as $routeData) {
|
||||
// Use 'GET' method for RPC.
|
||||
$this->dataGenerator->addRoute('POST', $routeData, new Handler($handler, $route));
|
||||
MiddlewareManager::addMiddlewares($server, $route, 'GET', $options['middleware'] ?? []);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user