Skip to content

Commit

Permalink
Merge pull request #11 from SimonLab/avatar
Browse files Browse the repository at this point in the history
return avatar information for user
  • Loading branch information
SimonLab authored Apr 15, 2020
2 parents 80510c7 + 9c17275 commit b7e4cc2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/app_api_web/auth_service_api.ex
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ defmodule AppApiWeb.AuthServiceApi do
{:ok, %HTTPoison.Response{status_code: 200, body: body}} ->
data = Poison.decode!(body)
# get name from api
person = %{id_person: data["data"]["id_person"], name: "", email: data["data"]["email"]}
person = %{
id_person: data["data"]["id_person"],
name: "",
email: data["data"]["email"],
avatar: ["data"]["avatar"]
}

{:ok, person}

{:ok, %HTTPoison.Response{status_code: 404}} ->
Expand Down

0 comments on commit b7e4cc2

Please sign in to comment.