Add admin dashboard controller

This commit is contained in:
Andreas Nedbal 2022-11-20 17:58:44 +01:00 committed by Andreas Nedbal
parent ce055b1e01
commit c61ccfa5c1
3 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,5 @@
class Admin::DashboardController < ApplicationController
before_action :authenticate_user!
def index; end
end

View File

@ -0,0 +1,5 @@
.card
.card-body
No dashboard content yet!
- parent_layout "admin"

View File

@ -12,6 +12,7 @@ Rails.application.routes.draw do
mount Sidekiq::Web, at: "/sidekiq"
mount PgHero::Engine, at: "/pghero", as: "pghero"
get "/admin", to: "admin/dashboard#index", as: :admin_dashboard
get "/admin/announcements", to: "announcement#index", as: :announcement_index
post "/admin/announcements", to: "announcement#create", as: :announcement_create
get "/admin/announcements/new", to: "announcement#new", as: :announcement_new