Added post score to index and variables.
This commit is contained in:
@@ -20,6 +20,7 @@ async function writeToIndex(posts, profilePaths, user, args) {
|
||||
hostId: post.host.id,
|
||||
date: post.datetime,
|
||||
indexed: now,
|
||||
score: post.score,
|
||||
title: post.title,
|
||||
};
|
||||
|
||||
@@ -39,7 +40,7 @@ async function writeToIndex(posts, profilePaths, user, args) {
|
||||
};
|
||||
|
||||
if (!data.profile.image && !data.profile.description && !data.posts.length) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
return save(filepath, textToStream(yaml.safeDump(data)));
|
||||
|
||||
Reference in New Issue
Block a user