Skip to content

Commit

Permalink
fix: tvod access type name
Browse files Browse the repository at this point in the history
  • Loading branch information
kiremitrov123 committed May 4, 2023
1 parent 759ed17 commit 9cf7941
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/inplayer.checkout.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ const formatEntitlements = (expiresAt: number = 0, accessGranted: boolean = fals
};

const formatOffer = (offer: GetAccessFee): Offer => {
const offerId = offer.access_type.name === 'ppv' ? `C${offer.id}` : `S${offer.id}`;
const ppvOffers = ['ppv', 'ppv_custom'];
const offerId = ppvOffers.includes(offer.access_type.name) ? `C${offer.id}` : `S${offer.id}`;
return {
id: offer.id,
offerId,
Expand Down

0 comments on commit 9cf7941

Please sign in to comment.