projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'fix/crash-favourited-by-ordered-collections' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
web.ex
diff --git
a/lib/pleroma/web/web.ex
b/lib/pleroma/web/web.ex
index 30558e6926ad601355372e544e688e629a28b682..b42f6887e17b090535f9170f6703ee8ca9b6f2fa 100644
(file)
--- a/
lib/pleroma/web/web.ex
+++ b/
lib/pleroma/web/web.ex
@@
-23,8
+23,17
@@
defmodule Pleroma.Web do
def controller do
quote do
use Phoenix.Controller, namespace: Pleroma.Web
def controller do
quote do
use Phoenix.Controller, namespace: Pleroma.Web
+
import Plug.Conn
import Plug.Conn
- import Pleroma.Web.{Gettext, Router.Helpers}
+ import Pleroma.Web.Gettext
+ import Pleroma.Web.Router.Helpers
+ import Pleroma.Web.TranslationHelpers
+
+ plug(:set_put_layout)
+
+ defp set_put_layout(conn, _) do
+ put_layout(conn, Pleroma.Config.get(:app_layout, "app.html"))
+ end
end
end
end
end
@@
-37,7
+46,9
@@
defmodule Pleroma.Web do
# Import convenience functions from controllers
import Phoenix.Controller, only: [get_csrf_token: 0, get_flash: 2, view_module: 1]
# Import convenience functions from controllers
import Phoenix.Controller, only: [get_csrf_token: 0, get_flash: 2, view_module: 1]
- import Pleroma.Web.{ErrorHelpers, Gettext, Router.Helpers}
+ import Pleroma.Web.ErrorHelpers
+ import Pleroma.Web.Gettext
+ import Pleroma.Web.Router.Helpers
require Logger
require Logger
@@
-71,6
+82,7
@@
defmodule Pleroma.Web do
def router do
quote do
use Phoenix.Router
def router do
quote do
use Phoenix.Router
+ # credo:disable-for-next-line Credo.Check.Consistency.MultiAliasImportRequireUse
import Plug.Conn
import Phoenix.Controller
end
import Plug.Conn
import Phoenix.Controller
end
@@
-78,6
+90,7
@@
defmodule Pleroma.Web do
def channel do
quote do
def channel do
quote do
+ # credo:disable-for-next-line Credo.Check.Consistency.MultiAliasImportRequireUse
use Phoenix.Channel
import Pleroma.Web.Gettext
end
use Phoenix.Channel
import Pleroma.Web.Gettext
end