Replace Mix.env with Pleroma.Config.get(:env)
Mix.env/0 is not availible in release environments such as distillery or elixir's built-in releases.
This commit is contained in:
parent
62cdf701f4
commit
92213fb87c
8 changed files with 13 additions and 9 deletions
|
|
@ -18,7 +18,7 @@ defmodule Pleroma.Web.RichMedia.Parser do
|
|||
|
||||
def parse(nil), do: {:error, "No URL provided"}
|
||||
|
||||
if Mix.env() == :test do
|
||||
if Pleroma.Config.get(:env) == :test do
|
||||
def parse(url), do: parse_url(url)
|
||||
else
|
||||
def parse(url) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue