Fix route conflict: Remove duplicate OPTIONS handler for telegram webhook

This commit is contained in:
mwpn
2026-01-26 09:47:52 +07:00
parent 4d341f3860
commit e15ff0baf8

View File

@@ -218,9 +218,7 @@ $app->post('/site/approve/{id_trx}', [$siteController, 'approve']);
// Telegram Bot Routes
$telegramBotController = new \App\Controllers\TelegramBotController();
$app->post('/telegram/webhook', [$telegramBotController, 'webhook']);
$app->options('/telegram/webhook', function (Request $request, Response $response) {
return $response->withStatus(200);
});
// Note: OPTIONS request sudah ditangani oleh route generic di line 56
// Run app
$app->run();