Skip to content

Commit

Permalink
don't merge when we don't need to
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleboe committed Jun 7, 2024
1 parent 486f7a1 commit 3f6ffb2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/jsonapi/serializer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,12 @@ defmodule JSONAPI.Serializer do
relationships: %{}
}

doc = custom_merge_links(encoded_data, view.links(data, conn))
# doc = merge_links(encoded_data, data, view, conn, nil, remove_links?(), options)

doc =
case view.meta(data, conn) do
nil -> doc
meta -> Map.put(doc, :meta, meta)
nil -> encoded_data
meta -> Map.put(encoded_data, :meta, meta)
end

encode_relationships(conn, doc, {view, data, query_includes, valid_includes}, options)
Expand Down

0 comments on commit 3f6ffb2

Please sign in to comment.