Skip to content

Commit

Permalink
Router variable name update
Browse files Browse the repository at this point in the history
  • Loading branch information
xtrime-ru committed Jan 26, 2020
1 parent feaf01f commit 1ecbcb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Server/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ private function setRoutes($client): void
{
$authorization = new Authorization();
$apiHandler = stack(ApiController::getRouterCallback($client, ApiExtensions::class), $authorization);
$combinedHandler = stack(SystemController::getRouterCallback($client, SystemApiExtensions::class), $authorization);
$systemApiHandler = stack(SystemController::getRouterCallback($client, SystemApiExtensions::class), $authorization);
$eventsHandler = stack(EventsController::getRouterCallback($client), $authorization);

foreach (['GET', 'POST'] as $method) {
$this->router->addRoute($method, '/api/{method}[/]', $apiHandler);
$this->router->addRoute($method, '/api/{session:.*?[^/]}/{method}[/]', $apiHandler);

$this->router->addRoute($method, '/system/{method}[/]', $combinedHandler);
$this->router->addRoute($method, '/system/{method}[/]', $systemApiHandler);
}

$this->router->addRoute('GET', '/events[/]', $eventsHandler);
Expand Down

0 comments on commit 1ecbcb5

Please sign in to comment.