From a5316e74b612a5b2cd16cf42586334321fc87770 Mon Sep 17 00:00:00 2001 From: Fatih Kaya Date: Wed, 26 Apr 2023 22:59:40 +0300 Subject: [PATCH] update --- modules/admaticBidAdapter.js | 10 +++++++--- test/spec/modules/admaticBidAdapter_spec.js | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/admaticBidAdapter.js b/modules/admaticBidAdapter.js index a6a4a5d1e63..85b441b3db9 100644 --- a/modules/admaticBidAdapter.js +++ b/modules/admaticBidAdapter.js @@ -104,9 +104,6 @@ export const spec = { height: bid.height, currency: body.cur || 'TRY', netRevenue: true, - ad: bid.type == "banner" ? bid.party_tag : undefined, - vastXml: bid.type == "video" ? bid.party_tag : undefined, - vastImpUrl: bid.type == "video" ? bid.iurl : undefined, creativeId: bid.creative_id, meta: { advertiserDomains: bid && bid.adomain ? bid.adomain : [] @@ -116,6 +113,13 @@ export const spec = { ttl: 360 }; + if (resbid.mediaType === "video") { + resbid.vastXml = bid.party_tag; + resbid.vastImpUrl = bid.iurl; + } else if (resbid.mediaType === "banner") { + resbid.ad = bid.party_tag; + }; + bidResponses.push(resbid); }); } diff --git a/test/spec/modules/admaticBidAdapter_spec.js b/test/spec/modules/admaticBidAdapter_spec.js index 34c4a38f16c..53ae39c642b 100644 --- a/test/spec/modules/admaticBidAdapter_spec.js +++ b/test/spec/modules/admaticBidAdapter_spec.js @@ -253,7 +253,9 @@ describe('admaticBidAdapter', () => { 'type': 'banner', 'bidder': 'admatic', 'adomain': ['admatic.com.tr'], - 'party_tag': '
' + 'party_tag': '
', + 'iurl': 'https://www.admatic.com.tr', + 'type': "banner" } ], 'queryId': 'cdnbh24rlv0hhkpfpln0',