Skip to content

Commit ca06c0c

Browse files
committed
group '/{id}'
1 parent 58d891d commit ca06c0c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Pet/ServiceFactory/Framework/PetRoutesDelegator.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ public function __invoke(ContainerInterface $container, mixed $_, callable $call
4747
Group::create('/pets', [
4848
Route::get('', 'pet_list', $petList),
4949
Route::post('', 'pet_create', $petCreate, [$contentType]),
50-
Route::get('/{id}', 'pet_read', $petRead),
51-
Route::put('/{id}', 'pet_update', $petUpdate, [$contentType]),
52-
Route::delete('/{id}', 'pet_delete', $petDelete),
50+
Group::create('/{id}', [
51+
Route::get('', 'pet_read', $petRead),
52+
Route::put('', 'pet_update', $petUpdate, [$contentType]),
53+
Route::delete('', 'pet_delete', $petDelete),
54+
]),
5355
]),
5456
], [$accept, $apiExceptionMiddleware]),
5557
])->getRoutes(),

0 commit comments

Comments
 (0)