mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-12-22 17:07:59 +01:00
13 lines
278 B
Elixir
13 lines
278 B
Elixir
defmodule PhilomenaWeb.AdvertView do
|
|
use PhilomenaWeb, :view
|
|
|
|
def advert_image_url(%{image: image}) do
|
|
advert_url_root() <> "/" <> image
|
|
end
|
|
|
|
def advert_image_url(_), do: nil
|
|
|
|
defp advert_url_root do
|
|
Application.get_env(:philomena, :advert_url_root)
|
|
end
|
|
end
|