Skip to content

Commit

Permalink
Code style for Sekindo and update JSCS rule
Browse files Browse the repository at this point in the history
  • Loading branch information
mkendall07 committed Jun 15, 2016
1 parent ed066ae commit 024d2b6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .jscsrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"validateIndentation": 2,
"disallowSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true
}
},
"disallowNewlineBeforeBlockStatements": true
}
27 changes: 9 additions & 18 deletions src/adapters/sekindo.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,15 @@ SekindoAdapter = function SekindoAdapter() {
}
}

pbjs.sekindoCB = function(callbackId, response)
{
pbjs.sekindoCB = function(callbackId, response) {
var bidObj = getBidRequest(callbackId);
if (typeof (response) !== 'undefined' && typeof (response.cpm) !== 'undefined')
{
if (typeof (response) !== 'undefined' && typeof (response.cpm) !== 'undefined') {
var bid = [];
if (bidObj)
{
if (bidObj) {
var bidCode = bidObj.bidder;
var placementCode = bidObj.placementCode;

if (response.cpm !== undefined && response.cpm > 0)
{
if (response.cpm !== undefined && response.cpm > 0) {

bid = bidfactory.createBid(CONSTANTS.STATUS.GOOD);
bid.adId = response.adId;
Expand All @@ -52,30 +48,25 @@ SekindoAdapter = function SekindoAdapter() {

bidmanager.addBidResponse(placementCode, bid);
}
else
{
else {
bid = bidfactory.createBid(CONSTANTS.STATUS.NO_BID);
bid.callback_uid = callbackId;
bid.bidderCode = bidCode;
bidmanager.addBidResponse(placementCode, bid);
}
}
}
else
{
if (bidObj)
{
else {
if (bidObj) {
utils.logMessage('No prebid response for placement '+bidObj.placementCode);
}
else
{
else {
utils.logMessage('sekindo callback general error');
}
}
};

function _requestBids(bid, callbackId, pubUrl)
{
function _requestBids(bid, callbackId, pubUrl) {
//determine tag params
var spaceId = utils.getBidIdParamater('spaceId', bid.params);
var bidfloor = utils.getBidIdParamater('bidfloor', bid.params);
Expand Down

0 comments on commit 024d2b6

Please sign in to comment.