Created
November 30, 2017 07:43
-
-
Save ermst4r/9068e0c8af1cc3308a8abba1092aa144 to your computer and use it in GitHub Desktop.
js example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Previous user was a bot | |
*/ | |
if (bid.fk_user_id === 0 && bid.fk_profile_bot_id > 0) { | |
var bid_type = method.populateBidType(bid); | |
var new_bid = bid.bid + 1; | |
Profilebot.generateRandomAutobotId(bid.fk_profile_bot_id).then(function (bot) { | |
return bot; | |
}).then(function (bot) { | |
var insert_data = ProfileBid.prepareInsertData(bid.fk_user_id, bot.bot_id, item.id, new_bid, bid_type); | |
return insert_data; | |
}).then(function (insert_data) { | |
return insert_data; | |
}).then(function (insert_data) { | |
ActiveAuctionProfile.increaseProfileTime(item.id,10).then(function (value) { | |
}); | |
}). catch(function (reason) { | |
reject(reason); | |
}); | |
/** | |
* prev user was a real user | |
*/ | |
} else if(bid.fk_user_id > 0 && bid.fk_profile_bot_id === 0 ) { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment