refactor(apiv1): use dossier preloader on api v1
This commit is contained in:
parent
701a28302e
commit
8ccf2bed4c
1 changed files with 1 additions and 0 deletions
|
@ -18,6 +18,7 @@ class API::V1::DossiersController < APIController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
dossier = @dossiers.for_api.find(params[:id])
|
dossier = @dossiers.for_api.find(params[:id])
|
||||||
|
DossierPreloader.load_one(dossier)
|
||||||
|
|
||||||
render json: { dossier: DossierSerializer.new(dossier).as_json }
|
render json: { dossier: DossierSerializer.new(dossier).as_json }
|
||||||
rescue ActiveRecord::RecordNotFound
|
rescue ActiveRecord::RecordNotFound
|
||||||
|
|
Loading…
Reference in a new issue