From 9958e90eb5eb5a2cc171c40860745e95a96bd429 Mon Sep 17 00:00:00 2001 From: Jordan Bracco Date: Tue, 20 Dec 2022 02:19:42 +0000 Subject: Actually do not prefix folders with nola_ refs T77 --- lib/matrix/plug.ex | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/matrix/plug.ex (limited to 'lib/matrix/plug.ex') diff --git a/lib/matrix/plug.ex b/lib/matrix/plug.ex new file mode 100644 index 0000000..c64ed11 --- /dev/null +++ b/lib/matrix/plug.ex @@ -0,0 +1,25 @@ +defmodule Nola.Matrix.Plug do + + defmodule Auth do + def init(state) do + state + end + + def call(conn, _) do + hs = Application.get_env(:matrix_app_service, :homeserver_token) + MatrixAppServiceWeb.AuthPlug.call(conn, hs) + end + end + + defmodule SetConfig do + def init(state) do + state + end + + def call(conn, _) do + config = Application.get_all_env(:matrix_app_service) + MatrixAppServiceWeb.SetConfigPlug.call(conn, config) + end + end + +end -- cgit v1.2.3