Skip to content

Commit

Permalink
set the default url, so UI is not blank (#1744)
Browse files Browse the repository at this point in the history
* set the default url, so UI is not blank

* rubocop

* fix setting fallback fedora url
  • Loading branch information
orangewolf authored Jan 2, 2022
1 parent be80308 commit 29bc4e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/fcrepo_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
class FcrepoEndpoint < Endpoint
store :options, accessors: %i[url base_path]

def url
options&.[](:url) || ActiveFedora.config&.credentials&.[](:url)
end

def switch!
ActiveFedora::Fedora.register(switchable_options.symbolize_keys)
end
Expand Down

0 comments on commit 29bc4e8

Please sign in to comment.