Первичная реализация, команды /list и /info
This commit is contained in:
13
config/bot.php
Normal file
13
config/bot.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (c) 2025, Антон Аксенов
|
||||
* This file is part of iptv.axenov.dev web interface
|
||||
* MIT License: https://git.axenov.dev/IPTV/web/src/branch/master/LICENSE
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'token' => env('TG_BOT_TOKEN'),
|
||||
'secret' => env('TG_BOT_SECRET'),
|
||||
];
|
||||
@@ -6,16 +6,29 @@
|
||||
*/
|
||||
|
||||
use App\Controllers\ApiController;
|
||||
use App\Controllers\BasicController;
|
||||
use App\Controllers\BotController;
|
||||
use App\Controllers\WebController;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Web routes
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
[
|
||||
'method' => ['GET', 'POST'],
|
||||
'path' => '/bot/webhook',
|
||||
'handler' => [BotController::class, 'webhook'],
|
||||
'name' => 'bot::webhook',
|
||||
],
|
||||
[
|
||||
'method' => ['GET', 'POST'],
|
||||
'path' => '/bot/update',
|
||||
'handler' => [BotController::class, 'update'],
|
||||
'name' => 'bot::update',
|
||||
],
|
||||
[
|
||||
'method' => 'GET',
|
||||
'path' => '/[page/{page:[0-9]+}]',
|
||||
@@ -59,12 +72,6 @@ return [
|
||||
'handler' => [ApiController::class, 'makeQrCode'],
|
||||
'name' => 'api::makeQrCode',
|
||||
],
|
||||
// [
|
||||
// 'method' => 'GET',
|
||||
// 'path' => '/{code:[0-9a-zA-Z]+}/logo/{hash:[0-9a-z]+}',
|
||||
// 'handler' => [ApiController::class, 'logo'],
|
||||
// 'name' => 'api::getChannelLogo',
|
||||
// ],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -74,7 +81,7 @@ return [
|
||||
|
||||
[
|
||||
'method' => '*',
|
||||
'path' => '/{path:.*}',
|
||||
'path' => '/{path:.+}',
|
||||
'handler' => [BasicController::class, 'notFound'],
|
||||
'name' => 'not-found',
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user