Billing Stripe, link regia mobile e staff solo trasmissione.

Aggiunge fatturazione club, pagina regia condivisibile senza account, roster squadre e rimuove la modalità controller dall'app (v1.1.0).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-29 07:23:13 +02:00
parent 4083bc5dee
commit f4b7be0f80
156 changed files with 5033 additions and 2033 deletions

View File

@@ -43,8 +43,8 @@ Rails.application.configure do
config.action_mailer.perform_caching = false
config.action_mailer.default_url_options = {
host: URI.parse(ENV.fetch("APP_PUBLIC_URL", "https://matchlivetv.eminux.it")).host,
protocol: URI.parse(ENV.fetch("APP_PUBLIC_URL", "https://matchlivetv.eminux.it")).scheme
host: URI.parse(ENV.fetch("APP_PUBLIC_URL", "https://www.matchlivetv.it")).host,
protocol: URI.parse(ENV.fetch("APP_PUBLIC_URL", "https://www.matchlivetv.it")).scheme
}
config.action_mailer.raise_delivery_errors = true

View File

@@ -64,4 +64,8 @@ Rails.application.configure do
# Raise error when a before_action's only/except options reference missing actions.
config.action_controller.raise_on_missing_callback_actions = true
config.hosts.clear
config.hosts << "www.example.com"
config.action_dispatch.host_authorization = { exclude: ->(_request) { true } }
end

View File

@@ -34,6 +34,7 @@ Rails.application.routes.draw do
post :telemetry
post :pairing_token
post :claim_pairing
post :regia_link
post :network_test
get :youtube_stats
end
@@ -62,7 +63,12 @@ Rails.application.routes.draw do
root to: "dashboard#index"
get "metrics", to: "dashboard#metrics"
resources :teams, only: %i[index show]
resources :sessions, only: %i[index show]
resources :clubs, only: [] do
resources :billing_invoices, only: %i[index new create], controller: "billing_invoices"
end
resources :sessions, only: %i[index show] do
member { post :stop }
end
end
get "hls/*path", to: "hls_proxy#show", format: false, constraints: { path: /.+/ }
@@ -72,6 +78,12 @@ Rails.application.routes.draw do
get "live/:id/status.json", to: "public/live#status", as: :public_live_status
get "replay/:id", to: "public/replay#show", as: :public_replay
get "regia/:token", to: "public/regia#show", as: :public_regia
get "regia/:token/status.json", to: "public/regia#status", as: :public_regia_status
patch "regia/:token/score", to: "public/regia#score", as: :public_regia_score
post "regia/:token/pause", to: "public/regia#pause", as: :public_regia_pause
post "regia/:token/stop", to: "public/regia#stop", as: :public_regia_stop
root to: "public/pages#home"
get "sitemap.xml", to: "public/sitemap#show", defaults: { format: :xml }
@@ -98,14 +110,26 @@ Rails.application.routes.draw do
get "clubs/:id/edit", to: "clubs#edit", as: :edit_club
patch "clubs/:id", to: "clubs#update"
get "clubs/:id/billing", to: "clubs#billing", as: :club_billing
get "clubs/:id/billing/profile", to: "club_billing#profile", as: :club_billing_profile
patch "clubs/:id/billing/profile", to: "club_billing#update_profile"
post "clubs/:id/billing/sync_payments", to: "club_billing#sync_payments", as: :club_billing_sync_payments
get "clubs/:id/billing/invoices/:invoice_id", to: "club_billing#download_invoice", as: :club_billing_invoice
get "clubs/:id/checkout", to: "clubs#checkout", as: :club_checkout
post "clubs/:id/portal", to: "clubs#portal", as: :club_portal
get "clubs/:club_id/matches/new", to: "club_matches#new", as: :new_club_match
post "clubs/:club_id/matches", to: "club_matches#create", as: :club_matches
get "teams/new", to: redirect("/clubs/new")
get "clubs/:club_id/teams/new", to: "teams#new", as: :new_club_team
post "clubs/:club_id/teams", to: "teams#create", as: :club_teams
get "teams/:id/dashboard", to: "teams#dashboard", as: :team_dashboard
get "teams/:id/dettagli", to: "teams#details", as: :team_details
get "teams/:id/dashboard", to: "teams#dashboard"
get "teams/:id/roster", to: "teams#roster"
get "teams/:id/edit", to: "teams#edit", as: :edit_team
patch "teams/:id", to: "teams#update"
patch "teams/:id", to: "teams#update", as: :team
resources :teams, only: [] do
resources :roster_members, only: %i[create edit update destroy], controller: "team_roster_members"
resources :matches, only: %i[index new create edit update destroy], controller: "matches"
end
get "teams/:id/invite", to: "teams#invite", as: :team_invite
post "teams/:id/invite", to: "teams#create_invitation"
post "teams/:id/staff/self", to: "teams#assign_self_staff", as: :team_assign_self_staff