Added post score to index and variables.

This commit is contained in:
2018-07-08 18:48:14 +02:00
parent dc96f8d4e8
commit 73504a6d32
3 changed files with 4 additions and 1 deletions

View File

@@ -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)));