class School::Legacy::HumanResources::DepartmentsController < ApplicationController
  def index
    render_success :ok, json: departments.map { |d| department_props(d) }
  end

  private
    def departments
      current_school.departments
    end

    def department_props(department)
      {
        id: department.id,
        name: department.name
      }
    end
end
