Skip to content

Commit

Permalink
feat: check for custom root in config on dashboard index
Browse files Browse the repository at this point in the history
  • Loading branch information
Tao-Galasse committed May 11, 2021
1 parent 31cac2e commit 4030f7c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/controllers/trestle/dashboard_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
class Trestle::DashboardController < Trestle::ApplicationController
def index
admin = primary_admin
redirect_to admin.path if admin
path = Trestle.config.root
if path == Trestle.config.path
path = primary_admin.path if primary_admin
end

redirect_to path
end

private
Expand Down

0 comments on commit 4030f7c

Please sign in to comment.