Skip to content

Commit

Permalink
fix: decode path parameters automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Sep 4, 2024
1 parent a14347e commit c7f3f5c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/ash_json_api/request.ex
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,14 @@ defmodule AshJsonApi.Request do
action: action,
includes: includes.allowed,
url: url(conn),
path_params: conn.path_params,
path_params:
Map.new(conn.path_params || %{}, fn
{k, v} when is_binary(v) ->
{k, URI.decode(v)}

{k, v} ->
{k, v}
end),
query_params: conn.query_params,
req_headers: conn.req_headers,
actor: get_actor(conn),
Expand Down

0 comments on commit c7f3f5c

Please sign in to comment.