Integrazione YouTube Live: OAuth squadra, canale piattaforma Light e UI.
Collegamento da Dettagli squadra e admin per il refresh token Match Live TV; API e app mobile allineate ai piani Light/Full. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
24
backend/app/services/youtube/credential_resolver.rb
Normal file
24
backend/app/services/youtube/credential_resolver.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
module Youtube
|
||||
class CredentialResolver
|
||||
def self.for_team(team)
|
||||
new(team).resolve
|
||||
end
|
||||
|
||||
def initialize(team)
|
||||
@team = team
|
||||
@mode = team.entitlements.plan.youtube_mode
|
||||
end
|
||||
|
||||
def resolve
|
||||
if @mode == "matchlivetv_light" && PlatformCredential.configured?
|
||||
PlatformCredential.new
|
||||
else
|
||||
@team.youtube_credential
|
||||
end
|
||||
end
|
||||
|
||||
def uses_platform_channel?
|
||||
@mode == "matchlivetv_light" && PlatformCredential.configured?
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user