diff --git a/app/actions/posts/handle.rb b/app/actions/posts/handle.rb index f7216b4..d548738 100644 --- a/app/actions/posts/handle.rb +++ b/app/actions/posts/handle.rb @@ -6,6 +6,7 @@ module Adamantium include Deps[ "settings", + "logger", "post_utilities.slugify", "repos.post_repo", post_param_parser: "param_parser.micropub_post", @@ -37,6 +38,8 @@ module Adamantium post_params = prepare_params(req_entity.to_h) validation = contract.call(post_params) + logger.info(req.params.inspect) + if validation.success? command.call(validation.to_h).bind do |post| res.status = 201 diff --git a/lib/adamantium/micropub_request_parser.rb b/lib/adamantium/micropub_request_parser.rb index d4eff7c..2781dbf 100644 --- a/lib/adamantium/micropub_request_parser.rb +++ b/lib/adamantium/micropub_request_parser.rb @@ -52,7 +52,7 @@ module Adamantium published_at: (params[:"post-status"] == "draft") ? nil : publish_time, category: params[:properties][:category] || [], name: params[:properties][:name]&.first, - content: params[:properties][:content]&.first&.tr("\n", " ") || "", + content: params[:properties][:content]&.first&.tr("\n", " "), slug: params[:slug] || params[:"mp-slug"], syndicate_to: Array(params[:properties][:"mp-syndicate-to"]) || [], photos: params[:properties][:photo] || [],