Stabilizza regia, live web e sync punteggi app nativa.
Corregge scadenza token regia oltre le 8h, tabellone HTML sulla pagina live, pulsanti pausa/ripresa in regia, link admin e broadcast ActionCable diretto. App Android: overlay branding, sync score da regia via WebSocket con reconnect e poll. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
16
backend/app/controllers/concerns/api/url_helper.rb
Normal file
16
backend/app/controllers/concerns/api/url_helper.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
module Api
|
||||
module UrlHelper
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
private
|
||||
|
||||
def api_absolute_url(path_or_url)
|
||||
return nil if path_or_url.blank?
|
||||
return path_or_url if path_or_url.match?(/\Ahttps?:\/\//i)
|
||||
|
||||
base = request.base_url
|
||||
path = path_or_url.start_with?("/") ? path_or_url : "/#{path_or_url}"
|
||||
"#{base}#{path}"
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user