mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
Forgot to prepend to the avatar_url path
This commit is contained in:
parent
297e0909d6
commit
0ae05b97b2
1 changed files with 5 additions and 1 deletions
|
@ -10,7 +10,7 @@ defmodule PhilomenaWeb.UserJson do
|
||||||
slug: user.slug,
|
slug: user.slug,
|
||||||
role: role(user),
|
role: role(user),
|
||||||
description: user.description,
|
description: user.description,
|
||||||
avatar_url: user.avatar,
|
avatar_url: avatar_url_root() <> "/" <> user.avatar,
|
||||||
created_at: user.created_at,
|
created_at: user.created_at,
|
||||||
comments_count: user.comments_posted_count,
|
comments_count: user.comments_posted_count,
|
||||||
uploads_count: user.uploads_count,
|
uploads_count: user.uploads_count,
|
||||||
|
@ -28,4 +28,8 @@ defmodule PhilomenaWeb.UserJson do
|
||||||
defp role(user) do
|
defp role(user) do
|
||||||
user.role
|
user.role
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp avatar_url_root do
|
||||||
|
Application.get_env(:philomena, :avatar_url_root)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue