Skip to content

Commit 5fab166

Browse files
[5.4] Fix webservice API config component: Component with numbers in name get code 404 (#46462)
1 parent 99ea2e7 commit 5fab166

File tree

1 file changed

+2
-2
lines changed
  • plugins/webservices/config/src/Extension

1 file changed

+2
-2
lines changed

plugins/webservices/config/src/Extension/Config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public function onBeforeApiRoute(BeforeApiRouteEvent $event): void
5959
$routes = [
6060
new Route(['GET'], 'v1/config/application', 'application.displayList', [], $getDefaults),
6161
new Route(['PATCH'], 'v1/config/application', 'application.edit', [], $defaults),
62-
new Route(['GET'], 'v1/config/:component_name', 'component.displayList', ['component_name' => '([A-Za-z_]+)'], $getDefaults),
63-
new Route(['PATCH'], 'v1/config/:component_name', 'component.edit', ['component_name' => '([A-Za-z_]+)'], $defaults),
62+
new Route(['GET'], 'v1/config/:component_name', 'component.displayList', ['component_name' => '([A-Za-z0-9_]+)'], $getDefaults),
63+
new Route(['PATCH'], 'v1/config/:component_name', 'component.edit', ['component_name' => '([A-Za-z0-9_]+)'], $defaults),
6464
];
6565

6666
$router->addRoutes($routes);

0 commit comments

Comments
 (0)