Вложения к записям, профилировщик запросов, приём вебхуков по токену
This commit is contained in:
1 parent
a75f27f3ed
commit
e42404ebe0
33 files changed
+1494
-124
No files matched your search
@@ -62,6 +62,7 @@ return static function (Router $router): void {
|
||||
|
||||
$router->group(['prefix' => '/webhooks', 'middleware' => 'can:' . Permission::WEBHOOKS_MANAGE], function (Router $router): void {
|
||||
$router->get('', [WebhooksController::class, 'index'])->name('admin.webhooks');
|
||||
$router->get('/incoming', [WebhooksController::class, 'incoming'])->name('admin.webhooks.incoming');
|
||||
$router->get('/new', [WebhooksController::class, 'create'])->name('admin.webhooks.create');
|
||||
$router->post('/new', [WebhooksController::class, 'store']);
|
||||
$router->get('/{id:\d+}', [WebhooksController::class, 'show'])->name('admin.webhooks.show');
|
||||
|
||||
@@ -22,6 +22,12 @@ return static function (Router $router): void {
|
||||
->middleware('throttle:600,60')
|
||||
->name('api.hooks');
|
||||
|
||||
// Те же вебхуки через GET: так шлют системы, которые не умеют POST.
|
||||
// Тела у такой посылки нет — всё в параметрах адреса
|
||||
$router->get('/hooks/{source}', [HooksController::class, 'receive'])
|
||||
->middleware('throttle:600,60')
|
||||
->name('api.hooks.get');
|
||||
|
||||
// Живость сервиса дёргает мониторинг по расписанию — без ключа
|
||||
$router->get('/health', [SystemController::class, 'health'])->name('api.health');
|
||||
|
||||
|
||||
@@ -101,6 +101,8 @@ return static function (Router $router): void {
|
||||
$router->post('/{id:\d+}/edit', [NotesController::class, 'update'])->middleware('can:notes.manage');
|
||||
$router->post('/{id:\d+}/delete', [NotesController::class, 'delete'])->middleware('can:notes.manage')->name('notes.delete');
|
||||
$router->get('/{id:\d+}/file', [NotesController::class, 'file'])->middleware('can:notes.view')->name('notes.file');
|
||||
$router->post('/{id:\d+}/detach', [NotesController::class, 'detach'])->middleware('can:notes.manage')->name('notes.detach');
|
||||
$router->get('/{id:\d+}/attachment/{attachment:\d+}', [NotesController::class, 'attachment'])->middleware('can:notes.view')->name('notes.attachment');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user