From 0c38da7de7d3b30f96eaa9aae95032e5e630ff6c Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Wed, 27 Jun 2018 17:20:33 -0700 Subject: [PATCH] Stop filtering out mp-* props --- lib/plug_micropub.ex | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/plug_micropub.ex b/lib/plug_micropub.ex index 4f553b8..5e0332e 100644 --- a/lib/plug_micropub.ex +++ b/lib/plug_micropub.ex @@ -299,10 +299,7 @@ defmodule PlugMicropub do defp parse_create_body("application/json", params) do with {:ok, ["h-" <> type]} <- Map.fetch(params, "type"), {:ok, properties} when is_map(properties) <- Map.fetch(params, "properties") do - properties = - properties - |> Enum.reject(&match?({"mp-" <> _, _}, &1)) - |> Map.new() + properties = Map.new(properties) {:ok, type, properties} else @@ -314,7 +311,6 @@ defmodule PlugMicropub do with {type, params} when is_binary(type) <- Map.pop(params, "h") do properties = params - |> Enum.reject(&match?({"mp-" <> _, _}, &1)) |> Enum.map(fn {k, v} -> {k, List.wrap(v)} end) |> Map.new()