Fix json parsing

This commit is contained in:
2024-02-24 15:02:10 +11:00
parent 0094ac4334
commit f9a4baa45f

View File

@@ -53,7 +53,7 @@ module Micropub
new_params = if req_type == :json new_params = if req_type == :json
content = if params[:properties][:content] content = if params[:properties][:content]
if params[:properties][:content].is_a?(Hash) && params[:properties][:content][:html] if params[:properties][:content].is_a?(Array) && params[:properties][:content].first[:html]
params[:properties][:content][:html] params[:properties][:content][:html]
else else
params[:properties][:content].first&.tr("\n", " ") params[:properties][:content].first&.tr("\n", " ")