Skip to content

Commit 9012c30

Browse files
committed
refactor: update the name for routes
(cherry picked from commit 8089d20)
1 parent d46164e commit 9012c30

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

routes/bot.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717

1818
$routePrefix = config('telegram-git-notifier.defaults.route_prefix');
1919

20-
Route::prefix($routePrefix)->group(function () use ($routePrefix) {
21-
Route::match(['get', 'post'], '/', IndexAction::class)->name("$routePrefix.index");
20+
Route::prefix($routePrefix)->name("$routePrefix.")->group(function () {
21+
Route::match(['get', 'post'], '/', IndexAction::class)->name("index");
2222

23-
Route::prefix('webhook')->group(function () use ($routePrefix) {
24-
Route::get('set', [WebhookAction::class, 'set'])->name("$routePrefix.webhook.set");
25-
Route::get('delete', [WebhookAction::class, 'delete'])->name("$routePrefix.webhook.delete");
26-
Route::get('info', [WebhookAction::class, 'getWebHookInfo'])->name("$routePrefix.webhook.info");
27-
Route::get('updates', [WebhookAction::class, 'getUpdates'])->name("$routePrefix.webhook.updates");
23+
Route::prefix('webhook')->name("webhook.")->group(function () {
24+
Route::get('set', [WebhookAction::class, 'set'])->name("set");
25+
Route::get('delete', [WebhookAction::class, 'delete'])->name("delete");
26+
Route::get('info', [WebhookAction::class, 'getWebHookInfo'])->name("info");
27+
Route::get('updates', [WebhookAction::class, 'getUpdates'])->name("updates");
2828
});
2929
});

0 commit comments

Comments
 (0)