Log params
This commit is contained in:
@@ -2,7 +2,7 @@ require "securerandom"
|
||||
|
||||
module Adamantium
|
||||
class MicropubRequestParser
|
||||
include Deps["post_utilities.slugify", "repos.post_repo"]
|
||||
include Deps["logger", "post_utilities.slugify", "repos.post_repo"]
|
||||
|
||||
def call(params:)
|
||||
return nil if params.key?(:action)
|
||||
@@ -61,7 +61,6 @@ module Adamantium
|
||||
new_params[:content] = params[:properties][:content]&.first&.tr("\n", " ")
|
||||
new_params[:slug] = params[:slug] || params["mp-slug"]
|
||||
new_params[:syndicate_to] = params[:properties][:"mp-syndicate-to"] || []
|
||||
|
||||
else
|
||||
new_params[:syndicate_to] = params[:"mp-syndicate-to"]&.split(",") || []
|
||||
new_params[:name] = params[:name]
|
||||
@@ -82,6 +81,8 @@ module Adamantium
|
||||
new_params[:url] = params[:"bookmark-of"]
|
||||
new_params[:slug] = slug(name: new_params[:name], default_slug: params[:slug])
|
||||
|
||||
logger.info(new_params)
|
||||
|
||||
new_params
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user