Created
November 23, 2018 06:02
-
-
Save pandres95/bc9395af42b87dd1be6cb4ccbe02160f to your computer and use it in GitHub Desktop.
This file contains 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
const BreakException = {}; | |
try { | |
for (let e of postsAffiliate) { | |
if (e.type === 'video') { | |
if (parseInt(e.object_id) === parseInt(lastId)) { | |
// Es igual. Rompe la secuencia. | |
continue; | |
} else { | |
const searchDb = await mysql.searchPostOnPosts(e.object_id); | |
if (searchDb) { | |
const searchPostAffiliate = | |
await mysql.searchPostAffiliateOnDB(e.object_id); | |
if (!searchPostAffiliate) { | |
await mysql.insertNewPostAffiliate(searchDb[0]); | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment