Browse Source

syntax fix

master
Pursuit 2 years ago
parent
commit
59de10e069
  1. 9
      lib/iqrcode/accounts/user_from_auth.ex

9
lib/iqrcode/accounts/user_from_auth.ex

@ -12,13 +12,12 @@ defmodule UserFromAuth do
end
# github does it this way
defp avatar_from_auth(%{info: %{urls: %{avatar_url: image}}}), do: image
facebook does it this way
defp avatar_from_auth(%{info: %{image: image}}), do: image
default case if nothing matches
#facebook does it this way
defp avatar_from_auth(%{info: %{image: image}}), do: image
#default case if nothing matches
defp avatar_from_auth(auth) do
Logger.warn(auth.provider <> " needs to find an avatar URL!")
Logger.debug(Jason.encode!(auth))

Loading…
Cancel
Save