Skip to content

Commit

Permalink
Change craftBidAdapter request URL (#6096)
Browse files Browse the repository at this point in the history
  • Loading branch information
crumbjp committed Dec 10, 2020
1 parent 754ce67 commit c8353d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions modules/craftBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import includes from 'core-js-pure/features/array/includes.js';
import { getStorageManager } from '../src/storageManager.js';

const BIDDER_CODE = 'craft';
const URL = 'https://gacraft.jp/prebid-v3';
const URL_BASE = 'https://gacraft.jp/prebid-v3';
const TTL = 360;
const storage = getStorageManager();

Expand Down Expand Up @@ -143,10 +143,11 @@ function formatRequest(payload, bidderRequest) {
withCredentials: false
};
}

const payloadString = JSON.stringify(payload);
return {
method: 'POST',
url: URL,
url: `${URL_BASE}/${payload.tags[0].sitekey}`,
data: payloadString,
bidderRequest,
options
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/craftBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('craftAdapter', function () {
it('sends bid request to ENDPOINT via POST', function () {
let request = spec.buildRequests(bidRequests, bidderRequest);
expect(request.method).to.equal('POST');
expect(request.url).to.equal('https://gacraft.jp/prebid-v3');
expect(request.url).to.equal('https://gacraft.jp/prebid-v3/craft-prebid-example');
let data = JSON.parse(request.data);
expect(data.tags).to.deep.equals([{
sitekey: 'craft-prebid-example',
Expand Down

0 comments on commit c8353d3

Please sign in to comment.