refactor(apiv1): use dossier preloader on api v1
This commit is contained in:
parent
ed4fbc887a
commit
df83322f0c
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue