mirror of
https://github.com/danog/TelegramApiServer.git
synced 2024-11-26 20:04:45 +01:00
Router variable name update
This commit is contained in:
parent
feaf01fd26
commit
1ecbcb5144
@ -40,14 +40,14 @@ class Router
|
||||
{
|
||||
$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);
|
||||
|
Loading…
Reference in New Issue
Block a user