Send weekly posts to Day One

This commit is contained in:
2023-03-07 22:02:05 +11:00
parent 4b2a8ee672
commit de34b2733f
6 changed files with 43 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ module Adamantium
"post_utilities.slugify",
renderer: "renderers.markdown",
syndicate: "commands.posts.syndicate",
send_to_dayone: "syndication.dayone",
add_post_syndication_source: "commands.posts.add_syndication_source",
send_webmentions: "commands.posts.send_webmentions",
]
@@ -18,6 +19,8 @@ module Adamantium
post_params = prepare_params(params: post)
created_post = post_repo.create(post_params)
send_to_dayone.call(name: post.name, content: post.content) if post[:category].include? "weekly"
syndicate.call(post).bind do |results|
results.each do |result|
source, url = result