refactor(apiv1): use dossier preloader on api v1

This commit is contained in:
Paul Chavard 2024-08-22 17:32:01 +02:00
parent 701a28302e
commit 8ccf2bed4c
No known key found for this signature in database

View file

@ -18,6 +18,7 @@ class API::V1::DossiersController < APIController
def show
dossier = @dossiers.for_api.find(params[:id])
DossierPreloader.load_one(dossier)
render json: { dossier: DossierSerializer.new(dossier).as_json }
rescue ActiveRecord::RecordNotFound