Added auth_template/0 to DatabaseAuthenticator.

This commit is contained in:
Ivan Tashkinov 2019-02-28 13:58:58 +03:00
commit 4e77f68414
3 changed files with 8 additions and 3 deletions

View file

@ -17,4 +17,9 @@ defmodule Pleroma.Web.Auth.DatabaseAuthenticator do
@callback handle_error(Plug.Conn.t(), any()) :: any()
def handle_error(plug, error), do: implementation().handle_error(plug, error)
@callback auth_template() :: String.t() | nil
def auth_template do
implementation().auth_template() || Pleroma.Config.get(:auth_template, "show.html")
end
end

View file

@ -23,4 +23,6 @@ defmodule Pleroma.Web.Auth.PleromaDatabaseAuthenticator do
def handle_error(%Plug.Conn{} = _conn, error) do
error
end
def auth_template, do: nil
end