Fixed username in save message.

This commit is contained in:
DebaucheryLibrarian 2024-09-11 05:16:58 +02:00
parent 7f79a44830
commit 350a2dc1dc
1 changed files with 7 additions and 2 deletions

View File

@ -47,10 +47,15 @@ async function writeToIndex(posts, profilePaths, user, args) {
try {
const yamlIndex = yaml.safeDump(data);
const saved = await save(filepath, Buffer.from(yamlIndex, 'utf8'));
return save(filepath, Buffer.from(yamlIndex, 'utf8'));
console.log(user);
logger.info(`Saved index with ${posts.length} new posts for ${user.name}`);
return saved;
} catch (error) {
logger.error(`Could not save index for ${user.username}: ${error.message}`);
logger.error(`Could not save index for ${user.name}: ${error.message}`);
return null;
}
}