class Family::Admissions::ApplicationsController < Family::Admissions::Controller
  def show
    if applicant
      render_success :ok, json: application_props
    else
      render_error :forbidden, message: 'Do not have access'
    end
  end

  private
    def applicant
      @applicant ||= current_family.admission_applicants.find_by(id: params[:id])
    end

    def application_props
      Admission::Applicants::ApplicationService.call(applicant.id, options: params[:options])
    end
end
