Fix route conflict: Remove duplicate OPTIONS handler for telegram webhook
This commit is contained in:
@@ -218,9 +218,7 @@ $app->post('/site/approve/{id_trx}', [$siteController, 'approve']);
|
|||||||
// Telegram Bot Routes
|
// Telegram Bot Routes
|
||||||
$telegramBotController = new \App\Controllers\TelegramBotController();
|
$telegramBotController = new \App\Controllers\TelegramBotController();
|
||||||
$app->post('/telegram/webhook', [$telegramBotController, 'webhook']);
|
$app->post('/telegram/webhook', [$telegramBotController, 'webhook']);
|
||||||
$app->options('/telegram/webhook', function (Request $request, Response $response) {
|
// Note: OPTIONS request sudah ditangani oleh route generic di line 56
|
||||||
return $response->withStatus(200);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Run app
|
// Run app
|
||||||
$app->run();
|
$app->run();
|
||||||
|
|||||||
Reference in New Issue
Block a user