class Family::Legacy::Students::DownloadScheduleController < Family::Controller
  def show
    render_success :ok, json: { url: schedule_pdf_url }
  end

  private
    def schedule_pdf
      Internal::Student::StudentScheduleService.call(current_school, student)
    end

    def schedule_pdf_url
      url = Rails.application.secrets.snap_api_url
      Pathname.new(url) + schedule_pdf['url']
    end
end
