Skip to content
Snippets Groups Projects

Ajout route API pour récupérer toutes les informations du transport

Merged GUILLIER THOMAS p2312389 requested to merge TransportDetailBackend into main
6 files
+ 34
2
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -2,6 +2,7 @@
namespace App\Controller;
use App\Entity\Transports;
use App\Services\TransportsServices;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
@@ -23,4 +24,10 @@ class TransportsController extends AbstractController
$keyword = $request->get('keyword', '');
return $transportsServices->getTransportsFromKeyword($keyword);
}
#[Route('/{id}', name:'detailTransport', methods: 'GET')]
public function getTransportDetail(Transports $transport, TransportsServices $transportsServices): JsonResponse
{
return $transportsServices->getTransportDetails($transport);
}
}
\ No newline at end of file
Loading