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>
25 lines
506 B
Ruby
25 lines
506 B
Ruby
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
|