Commit 0abc9e55ff3e2627a4b50e9e8735f1d222cd7748

Thomas de Grivel 2022-01-07T11:27:55

refactor

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/lib/kmxgit_web/controllers/page_controller.ex b/lib/kmxgit_web/controllers/page_controller.ex
index 966abb0..49742ea 100644
--- a/lib/kmxgit_web/controllers/page_controller.ex
+++ b/lib/kmxgit_web/controllers/page_controller.ex
@@ -20,9 +20,10 @@ defmodule KmxgitWeb.PageController do
     if ! UserManager.admin_user_present? do
       changeset = UserManager.change_user(%User{})
       conn
+      |> assign(:action, Routes.page_path(conn, :new_admin))
+      |> assign(:changeset, changeset)
       |> assign(:no_navbar_links, true)
-      |> render("new_admin.html", changeset: changeset,
-                action: Routes.page_path(conn, :new_admin))
+      |> render("new_admin.html")
     else
       redirect(conn, to: "/")
     end