Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ContentController should operate out of the content directory #177

Merged
merged 1 commit into from
Dec 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/controllers/content_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ class ContentController < ApplicationController
end

def read
location = druid_tools.path(params[:path])

location = druid_tools.find(:content, params[:path])
return render status: :not_found unless location
send_file location
end

def list
location = druid_tools.path
location = druid_tools.content_dir(false)

raise ActionController::MissingFile, location unless Dir.exist? location

Expand Down