Added preview property. Removed debugging intercepts. Logging post permalink on failed info fetch.
This commit is contained in:
@@ -6,8 +6,6 @@ const dissectLink = require('../dissectLink.js');
|
||||
function curatePosts(posts, ignore) {
|
||||
const processed = new Set();
|
||||
|
||||
console.log(ignore);
|
||||
|
||||
return posts.reduce((acc, post, index) => {
|
||||
const host = dissectLink(post.url);
|
||||
const ignoring = ignore ? ignore.find(prop => {
|
||||
@@ -40,6 +38,7 @@ function curatePosts(posts, ignore) {
|
||||
url: post.url,
|
||||
datetime: new Date(post.created_utc * 1000),
|
||||
subreddit: post.subreddit.display_name,
|
||||
preview: post.preview ? post.preview.images.map(image => image.source) : null,
|
||||
host
|
||||
});
|
||||
}, []);
|
||||
|
||||
Reference in New Issue
Block a user