Current section

Files

Jump to
ash_json_api lib ash_json_api json_api_resource route.ex
Raw

lib/ash_json_api/json_api_resource/route.ex

defmodule AshJsonApi.JsonApiResource.Route do
@moduledoc false
defstruct [
:route,
:action,
:action_type,
:method,
:fields,
:controller,
:relationship,
:type,
:primary?
]
@type t :: %__MODULE__{}
def new(opts) do
%__MODULE__{
route: opts[:route],
type: opts[:type],
action: opts[:action],
action_type: opts[:action_type],
primary?: opts[:primary?],
method: opts[:method],
controller: opts[:controller],
relationship: opts[:relationship]
}
end
end