Building a JSON API
This is a paid lesson.
Buy the course Discover Elixir & Phoenix
- Read all 22 lessons
- Lifetime access
You need a Ludu account in order to ask the instructor a question or post a comment.
function nil.email/0 is undefined or privateI am getting this error. Is it due to the user id conflict in the database?
... and this is now xxx_create_room_users.exs
this is now xxx_create_messages.exs
For Safari there's JSONView: https://safari-extensions.apple.com/details/?id=com.dcrousso.jsonview-safari-Q5M4T22BE9
Line 20 has an extra }
me = User |> Ecto.Query.first |> Repo.one
I had few lines in my db and Repo.one was throwing an error
Is it "render/3" or "render/2"? Function "render" seems to get two arguments in the code below.
@bdarla: You're right, it should be
render/2, which gets called by
render/3 in our controller. I've updated the code now!