From 971e0007dd5c7d83bc2b7a999b569e102b3d6a59 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sun, 23 Apr 2023 10:48:30 +1000 Subject: [PATCH] Refactor day one syndication --- app/commands/posts/create_entry.rb | 1 - app/commands/posts/syndicate.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/commands/posts/create_entry.rb b/app/commands/posts/create_entry.rb index 9ecf9fd..6585992 100644 --- a/app/commands/posts/create_entry.rb +++ b/app/commands/posts/create_entry.rb @@ -18,7 +18,6 @@ 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(created_post.id, post) # decorated_post = Decorators::Posts::Decorator.new(created_post) diff --git a/app/commands/posts/syndicate.rb b/app/commands/posts/syndicate.rb index 8bc85c6..9506f4c 100644 --- a/app/commands/posts/syndicate.rb +++ b/app/commands/posts/syndicate.rb @@ -24,7 +24,7 @@ module Adamantium end if post[:category].include? "weekly" - send_to_dayone.call(name: post.name, content: post.content) + send_to_dayone.call(name: post[:name], content: post[:content]) end Success()