class School::Legacy::SchoolDaysController < ApplicationController
  def show
    render_success :ok, json: school_day_props(school_day)
  end

  private
    def school_day
      current_school_year.school_days.find_by(date: params[:date] || Date.today)
    end

    def school_day_props(day)
      {
        date: day&.date
      }
    end
end
