Apply 2 suggestion(s) to 1 file(s)
This commit is contained in:
parent
11d40e92b7
commit
0d6b9ce8ca
|
@ -59,7 +59,7 @@ defp gather_links(%User{} = user) do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp gather_aliases(%User{} = user) do
|
defp gather_aliases(%User{} = user) do
|
||||||
[user.ap_id] ++ user.also_known_as
|
[user.ap_id | user.also_known_as]
|
||||||
end
|
end
|
||||||
|
|
||||||
def represent_user(user, "JSON") do
|
def represent_user(user, "JSON") do
|
||||||
|
@ -76,8 +76,9 @@ def represent_user(user, "XML") do
|
||||||
{:ok, user} = User.ensure_keys_present(user)
|
{:ok, user} = User.ensure_keys_present(user)
|
||||||
|
|
||||||
aliases =
|
aliases =
|
||||||
gather_aliases(user)
|
user
|
||||||
|> Enum.map(fn the_alias -> {:Alias, the_alias} end)
|
|> gather_aliases()
|
||||||
|
|> Enum.map(&{:Alias, &1})
|
||||||
|
|
||||||
links =
|
links =
|
||||||
gather_links(user)
|
gather_links(user)
|
||||||
|
|
Loading…
Reference in a new issue