From 3d49c7c44e73c002d6d7a9361274a46e1c493cee Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Thu, 7 Nov 2024 22:23:07 +0100 Subject: [PATCH] Hot cleanup on routes --- appinfo/routes.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index 427b3af4..c9d6d324 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -12,19 +12,19 @@ ], 'routes' => [ // Directory - ['name' => 'listing#synchronise', 'url' => '/api/listings/synchronise/{id?}', 'verb' => 'POST'], + ['name' => 'listing#synchronise', 'url' => '/api/listings/synchronise/{id?}', 'verb' => 'POST', 'requirements' => ['id' => '[^/]+']], ['name' => 'directory#index', 'url' => '/api/directory', 'verb' => 'GET'], - ['name' => 'directory#show', 'url' => '/api/directory/{id}', 'verb' => 'GET', 'requirements' => ['path' => '.+']], + ['name' => 'directory#show', 'url' => '/api/directory/{id}', 'verb' => 'GET', 'requirements' => ['id' => '[^/]+']], ['name' => 'directory#update', 'url' => '/api/directory', 'verb' => 'POST'], - ['name' => 'directory#publicationType', 'url' => '/api/directory/publication_types/{id}', 'verb' => 'GET'], // Should be in directory becouse its public + ['name' => 'directory#publicationType', 'url' => '/api/directory/publication_types/{id}', 'verb' => 'GET', 'requirements' => ['id' => '[^/]+']], // Should be in directory becouse its public // Publication ['name' => 'publication_types#synchronise', 'url' => '/api/publication_types/synchronise', 'verb' => 'POST'], // Dashboard ['name' => 'dashboard#index', 'url' => '/index', 'verb' => 'GET'], ['name' => 'dashboard#page', 'url' => '/', 'verb' => 'GET'], // Publications - ['name' => 'publications#attachments', 'url' => '/api/publications/{id}/attachments', 'verb' => 'GET'], - ['name' => 'publications#download', 'url' => '/api/publications/{id}/download', 'verb' => 'GET'], + ['name' => 'publications#attachments', 'url' => '/api/publications/{id}/attachments', 'verb' => 'GET', 'requirements' => ['id' => '[^/]+']], + ['name' => 'publications#download', 'url' => '/api/publications/{id}/download', 'verb' => 'GET', 'requirements' => ['id' => '[^/]+']], // user Settings & Global Configuration ['name' => 'settings#index', 'url' => '/settings', 'verb' => 'GET'], ['name' => 'settings#create', 'url' => '/settings', 'verb' => 'POST'], @@ -37,6 +37,6 @@ ['name' => 'search#publication', 'url' => '/api/search/publications/{publicationId}', 'verb' => 'GET', 'requirements' => ['publicationId' => '[^/]+']], ['name' => 'search#attachments', 'url' => '/api/search/publications/{publicationId}/attachments', 'verb' => 'GET', 'requirements' => ['publicationId' => '[^/]+']], ['name' => 'search#themes', 'url' => '/api/search/themes', 'verb' => 'GET'], - ['name' => 'search#theme', 'url' => '/api/search/themes/{themeId}', 'verb' => 'GET', 'requirements' => ['themeId' => '\d+']] + ['name' => 'search#theme', 'url' => '/api/search/themes/{themeId}', 'verb' => 'GET', 'requirements' => ['themeId' => '[^/]+']] ] ];