lucacorti / jsonapi_plug

JSON:API library for Plug and Phoenix applications
https://hexdocs.pm/jsonapi_plug
MIT License
11 stars 3 forks source link

Refactor code #64

Closed treere closed 6 months ago

treere commented 6 months ago

This is only a code refactoring.

The main change is that i changed the pattern:

%Stuff{} |> set_a(data) |> set_b(data) |> set_c(data)

Into

%Stuff{a: create_a(data), b: create_b(data)}

I did this because set_a function is more complex than create_a and it is explicit that to create the a value I use only data.