From 34429ce640e3d4d4b42b2a852db6195ee626c20e Mon Sep 17 00:00:00 2001 From: optclblast Date: Wed, 18 Sep 2024 00:46:33 +0300 Subject: [PATCH] tmp --- lib/draincloud_core/auth/sessions_store.ex | 2 ++ .../controllers/auth_controller/auth_controller.ex | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/lib/draincloud_core/auth/sessions_store.ex b/lib/draincloud_core/auth/sessions_store.ex index fdffe7c..9818ffd 100644 --- a/lib/draincloud_core/auth/sessions_store.ex +++ b/lib/draincloud_core/auth/sessions_store.ex @@ -17,5 +17,7 @@ defmodule DrainCloudCore.Auth.SessionsStore do end + def initialize_session(conn, user) do + end end diff --git a/lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex b/lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex index 4411127..930b5fb 100644 --- a/lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex +++ b/lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex @@ -9,6 +9,16 @@ defmodule DrainCloudCoreWeb.AuthController do alias DrainCloudCore.Auth.Users , as: Repo def register(conn, _params) do + Log.debug( + Enum.find_value(conn.req_headers, "", fn x -> + case x do + {"user-agent", agent} -> agent + _ -> nil + end + end) + |> inspect + ) + try do RegisterRequest.from_request(conn) |> RegisterRequest.to_model