Sha256: 5b1199757db23e2f76c5ce99a63337f1f6a0e236923bf93aa540c66dcb0d2ea8

Contents?: true

Size: 436 Bytes

Versions: 16

Compression:

Stored size: 436 Bytes

Contents

require_dependency "landable/api_controller"

module Landable
  module Api
    class DirectoriesController < ApiController
      def index
        ids = params[:ids] if params[:ids].present? and params[:ids].is_a? Array
        ids ||= ['/']

        listings = ids.map { |id| Directory.listing id }
        respond_with listings
      end

      def show
        respond_with Directory.listing(params[:id])
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
landable-1.13.1 app/controllers/landable/api/directories_controller.rb
landable-1.12.3 app/controllers/landable/api/directories_controller.rb
landable-1.12.2 app/controllers/landable/api/directories_controller.rb
landable-1.12.1 app/controllers/landable/api/directories_controller.rb
landable-1.11.1 app/controllers/landable/api/directories_controller.rb
landable-1.11.0 app/controllers/landable/api/directories_controller.rb
landable-1.10.0.rc2 app/controllers/landable/api/directories_controller.rb
landable-1.10.0.rc1 app/controllers/landable/api/directories_controller.rb
landable-1.9.2 app/controllers/landable/api/directories_controller.rb
landable-1.9.1 app/controllers/landable/api/directories_controller.rb
landable-1.9.0 app/controllers/landable/api/directories_controller.rb
landable-1.9.0.rc2 app/controllers/landable/api/directories_controller.rb
landable-1.9.0.rc1 app/controllers/landable/api/directories_controller.rb
landable-1.8.0 app/controllers/landable/api/directories_controller.rb
landable-1.7.1.rc1 app/controllers/landable/api/directories_controller.rb
landable-1.7.0 app/controllers/landable/api/directories_controller.rb