Ash Framework B4: typo (page 138)

in Chapter 6. Authorization: What Can You Do? • 138

06/lib/tunez/accounts.ex

base_route"/users", Tunez.Accounts.User do
  # ...
➤ post :sign_in_with_password do
➤   route"/sign_in"
➤
➤   metadata fn _subject, user, _request ->
➤     %{token: user.__metadata__.token}
➤   end
➤ end

Is it route "/sign_in" or route “/sign-in”?

It could really be either, whatever you want the login endpoint URL to be :slight_smile:

That being said, the web app uses /sign-in as the URL so it would be good for the API URL to be consistent with that. I’ll make that change, thank you!

2 Likes