I’m trying to create a JSON API with Ash which adds headers to the response.
post MyApp.Accounts.User, :get_by_email_and_password do
route "/login"
modify_conn fn conn, _subject, result, request ->
IO.inspect(request)
# code to add headers
end
end
end
I noticed that IO.inspect
does not get called when there is no result from using action get_by_email_and_password
. I’m wondering if the modify_conn
is passed through only when there is result.
Thanks in advance