From 6f0a2698f10a820608327f6093c1a6e579a98096 Mon Sep 17 00:00:00 2001 From: Luna D Date: Sun, 23 Jun 2024 10:43:16 -0400 Subject: [PATCH] Remove conn from details_func invocation --- lib/philomena_web/plugs/moderation_log_plug.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/philomena_web/plugs/moderation_log_plug.ex b/lib/philomena_web/plugs/moderation_log_plug.ex index 4ee75938..e69da570 100644 --- a/lib/philomena_web/plugs/moderation_log_plug.ex +++ b/lib/philomena_web/plugs/moderation_log_plug.ex @@ -17,7 +17,7 @@ defmodule PhilomenaWeb.ModerationLogPlug do def init(opts), do: opts @type log_details :: %{subject_path: String.t(), body: String.t()} - @type details_func :: (Plug.Conn.t(), atom(), any() -> log_details()) + @type details_func :: (atom(), any() -> log_details()) @type call_opts :: [details: details_func, data: any()] @doc false @@ -29,7 +29,7 @@ defmodule PhilomenaWeb.ModerationLogPlug do user = conn.assigns.current_user action = Controller.action_name(conn) - %{subject_path: subject_path, body: body} = details_func.(conn, action, userdata) + %{subject_path: subject_path, body: body} = details_func.(action, userdata) mod = Controller.controller_module(conn) [mod_name] = Regex.run(@controller_regex, to_string(mod), capture: :all_but_first)