From 4d64d02fb9ee3c0cb657bedae418dc58a05b1a75 Mon Sep 17 00:00:00 2001 From: Xuan Thinh Date: Sun, 8 Oct 2023 13:23:34 +0700 Subject: [PATCH 1/2] wip: update route and delete comment for action --- routes/bot.php | 6 ++++-- src/Http/Actions/WebhookAction.php | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/routes/bot.php b/routes/bot.php index dcdf28f..f2c50f1 100644 --- a/routes/bot.php +++ b/routes/bot.php @@ -15,6 +15,8 @@ */ Route::prefix('telegram-git-notifier')->group(function () { - Route::get('/set-webhook', [WebhookAction::class, 'set'])->name('set-webhook'); - Route::get('/delete-webhook', [WebhookAction::class, 'delete'])->name('delete-webhook'); + Route::prefix('webhook')->group(function () { + Route::get('/set', [WebhookAction::class, 'set'])->name('set-webhook'); + Route::get('/delete', [WebhookAction::class, 'delete'])->name('delete-webhook'); + }); }); diff --git a/src/Http/Actions/WebhookAction.php b/src/Http/Actions/WebhookAction.php index 5f5196f..1399f4d 100644 --- a/src/Http/Actions/WebhookAction.php +++ b/src/Http/Actions/WebhookAction.php @@ -4,9 +4,6 @@ use LbilTech\TelegramGitNotifier\Services\WebhookService; -/** - * Class WebhookAction. - */ class WebhookAction { protected string $token; From 7abdf47e0bdab6b8153e7f4799bb135f87de8047 Mon Sep 17 00:00:00 2001 From: Xuan Thinh Date: Sun, 8 Oct 2023 15:44:11 +0700 Subject: [PATCH 2/2] fix: change comment and name for route --- routes/bot.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/routes/bot.php b/routes/bot.php index f2c50f1..8b8757a 100644 --- a/routes/bot.php +++ b/routes/bot.php @@ -8,15 +8,15 @@ | Bot Routes |-------------------------------------------------------------------------- | -| Here is where you can register web routes for your application. These +| Here is where you can register bot routes for your application. These | routes are loaded by the RouteServiceProvider and all of them will -| be assigned to the "web" middleware group. Make something great! +| be assigned to the "bot" middleware group. Make something great! | */ Route::prefix('telegram-git-notifier')->group(function () { Route::prefix('webhook')->group(function () { - Route::get('/set', [WebhookAction::class, 'set'])->name('set-webhook'); - Route::get('/delete', [WebhookAction::class, 'delete'])->name('delete-webhook'); + Route::get('/set', [WebhookAction::class, 'set'])->name('webhook.set'); + Route::get('/delete', [WebhookAction::class, 'delete'])->name('webhook.delete'); }); });