diff --git a/modules/accredited_representative_portal/app/controllers/accredited_representative_portal/v0/power_of_attorney_requests_controller.rb b/modules/accredited_representative_portal/app/controllers/accredited_representative_portal/v0/power_of_attorney_requests_controller.rb index f8387180711..2f0dc0a512a 100644 --- a/modules/accredited_representative_portal/app/controllers/accredited_representative_portal/v0/power_of_attorney_requests_controller.rb +++ b/modules/accredited_representative_portal/app/controllers/accredited_representative_portal/v0/power_of_attorney_requests_controller.rb @@ -4,12 +4,12 @@ module AccreditedRepresentativePortal module V0 class PowerOfAttorneyRequestsController < ApplicationController def index - poa_requests = PowerOfAttorneyRequest.includes(:resolution) + poa_requests = PowerOfAttorneyRequest.includes(resolution: :resolving).limit(100) render json: PowerOfAttorneyRequestSerializer.new(poa_requests).serializable_hash, status: :ok end def show - poa_request = PowerOfAttorneyRequest.includes(:resolution).find(params[:id]) + poa_request = PowerOfAttorneyRequest.includes(resolution: :resolving).find(params[:id]) render json: PowerOfAttorneyRequestSerializer.new(poa_request).serializable_hash, status: :ok rescue ActiveRecord::RecordNotFound render json: { error: 'Record not found' }, status: :not_found