Fix JSON parsing

This commit is contained in:
2024-02-24 15:05:30 +11:00
parent 090f28e202
commit 8b6dd9d932

View File

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