Initial commit: monorepo Match Live TV.
Rails API, app Flutter, infrastruttura Docker/MediaMTX, sito marketing e documentazione di deploy. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
module Admin
|
||||
class BaseController < ActionController::Base
|
||||
layout "admin"
|
||||
protect_from_forgery with: :null_session
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
module Admin
|
||||
class DashboardController < Admin::BaseController
|
||||
def index
|
||||
@teams = Team.includes(:matches).order(:name)
|
||||
@active_sessions = StreamSession.where(status: %w[live reconnecting connecting]).includes(:match)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,12 @@
|
||||
module Admin
|
||||
class SessionsController < Admin::BaseController
|
||||
def index
|
||||
@sessions = StreamSession.includes(:match, :user).order(created_at: :desc).limit(50)
|
||||
end
|
||||
|
||||
def show
|
||||
@session = StreamSession.find(params[:id])
|
||||
@events = @session.stream_events.recent.limit(50)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,12 @@
|
||||
module Admin
|
||||
class TeamsController < Admin::BaseController
|
||||
def index
|
||||
@teams = Team.all.order(:name)
|
||||
end
|
||||
|
||||
def show
|
||||
@team = Team.find(params[:id])
|
||||
@matches = @team.matches.order(scheduled_at: :desc)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user