move avi.png & banner.png from /priv/static/static to /priv/static/images
This commit is contained in:
parent
15cb3f2b01
commit
ea6d1b2b17
5 changed files with 14 additions and 14 deletions
|
@ -29,14 +29,14 @@ defmodule Pleroma.User do
|
|||
def avatar_url(user) do
|
||||
case user.avatar do
|
||||
%{"url" => [%{"href" => href} | _]} -> href
|
||||
_ -> "#{Web.base_url()}/static/avi.png"
|
||||
_ -> "#{Web.base_url()}/images/avi.png"
|
||||
end
|
||||
end
|
||||
|
||||
def banner_url(user) do
|
||||
case user.info["banner"] do
|
||||
%{"url" => [%{"href" => href} | _]} -> href
|
||||
_ -> "#{Web.base_url()}/static/banner.png"
|
||||
_ -> "#{Web.base_url()}/images/banner.png"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
@ -19,10 +19,10 @@ test "Represent a user account" do
|
|||
statuses_count: 5,
|
||||
note: user.bio,
|
||||
url: user.ap_id,
|
||||
avatar: "http://localhost:4001/static/avi.png",
|
||||
avatar_static: "http://localhost:4001/static/avi.png",
|
||||
header: "http://localhost:4001/static/banner.png",
|
||||
header_static: "http://localhost:4001/static/banner.png",
|
||||
avatar: "http://localhost:4001/images/avi.png",
|
||||
avatar_static: "http://localhost:4001/images/avi.png",
|
||||
header: "http://localhost:4001/images/banner.png",
|
||||
header_static: "http://localhost:4001/images/banner.png",
|
||||
source: %{
|
||||
note: "",
|
||||
privacy: "public",
|
||||
|
|
|
@ -33,8 +33,8 @@ test "A user" do
|
|||
{:ok, user} = User.update_follower_count(user)
|
||||
Cachex.set(:user_cache, "user_info:#{user.id}", User.user_info(Repo.get!(User, user.id)))
|
||||
|
||||
image = "http://localhost:4001/static/avi.png"
|
||||
banner = "http://localhost:4001/static/banner.png"
|
||||
image = "http://localhost:4001/images/avi.png"
|
||||
banner = "http://localhost:4001/images/banner.png"
|
||||
|
||||
represented = %{
|
||||
"id" => user.id,
|
||||
|
@ -65,8 +65,8 @@ test "A user" do
|
|||
test "A user for a given other follower", %{user: user} do
|
||||
{:ok, follower} = UserBuilder.insert(%{following: [User.ap_followers(user)]})
|
||||
{:ok, user} = User.update_follower_count(user)
|
||||
image = "http://localhost:4001/static/avi.png"
|
||||
banner = "http://localhost:4001/static/banner.png"
|
||||
image = "http://localhost:4001/images/avi.png"
|
||||
banner = "http://localhost:4001/images/banner.png"
|
||||
|
||||
represented = %{
|
||||
"id" => user.id,
|
||||
|
@ -98,8 +98,8 @@ test "A user that follows you", %{user: user} do
|
|||
follower = insert(:user)
|
||||
{:ok, follower} = User.follow(follower, user)
|
||||
{:ok, user} = User.update_follower_count(user)
|
||||
image = "http://localhost:4001/static/avi.png"
|
||||
banner = "http://localhost:4001/static/banner.png"
|
||||
image = "http://localhost:4001/images/avi.png"
|
||||
banner = "http://localhost:4001/images/banner.png"
|
||||
|
||||
represented = %{
|
||||
"id" => follower.id,
|
||||
|
@ -131,8 +131,8 @@ test "A blocked user for the blocker", %{user: user} do
|
|||
user = insert(:user)
|
||||
blocker = insert(:user)
|
||||
User.block(blocker, user)
|
||||
image = "http://localhost:4001/static/avi.png"
|
||||
banner = "http://localhost:4001/static/banner.png"
|
||||
image = "http://localhost:4001/images/avi.png"
|
||||
banner = "http://localhost:4001/images/banner.png"
|
||||
|
||||
represented = %{
|
||||
"id" => user.id,
|
||||
|
|
Loading…
Reference in a new issue