From c3259caf7a6cf4017a160b6b23af15de3aac6832 Mon Sep 17 00:00:00 2001 From: nelsonic Date: Wed, 30 Sep 2020 11:40:39 +0100 Subject: [PATCH] remove ElixirAuthGoogle.generate_oauth_url/1 from page_controller as no longer used #65 --- lib/app_web/controllers/page_controller.ex | 13 ++----------- lib/app_web/templates/page/index.html.eex | 14 -------------- mix.exs | 2 +- 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/lib/app_web/controllers/page_controller.ex b/lib/app_web/controllers/page_controller.ex index 6f5e3182..25cdb44d 100644 --- a/lib/app_web/controllers/page_controller.ex +++ b/lib/app_web/controllers/page_controller.ex @@ -11,13 +11,9 @@ defmodule AppWeb.PageController do end def index(conn, _params) do - url_oauth_google = ElixirAuthGoogle.generate_oauth_url(conn) changeset = Person.changeset_registration(%Person{}, %{}) - render(conn, "index.html", - url_oauth_google: url_oauth_google, - changeset: changeset - ) + render(conn, "index.html", changeset: changeset) end def register(conn, %{"person" => person_params}) do @@ -31,12 +27,7 @@ defmodule AppWeb.PageController do create_basic_session(conn, person) {:error, %Ecto.Changeset{} = changeset} -> - url_oauth_google = ElixirAuthGoogle.generate_oauth_url(conn) - - render(conn, "index.html", - url_oauth_google: url_oauth_google, - changeset: changeset - ) + render(conn, "index.html", changeset: changeset) end else login(conn, person, person_params) diff --git a/lib/app_web/templates/page/index.html.eex b/lib/app_web/templates/page/index.html.eex index e996400b..506372fe 100644 --- a/lib/app_web/templates/page/index.html.eex +++ b/lib/app_web/templates/page/index.html.eex @@ -4,20 +4,6 @@

Unlock a new level of personal effectiveness.

-
- - - Sign in with Google - - -
- OR
<%= form_for @changeset, Routes.page_path(@conn, :register), fn f -> %> diff --git a/mix.exs b/mix.exs index 03c09ac1..05320c00 100644 --- a/mix.exs +++ b/mix.exs @@ -78,7 +78,7 @@ defmodule App.MixProject do "ecto.setup": ["ecto.create --quiet", "ecto.migrate --quiet", "seeds"], "ecto.reset": ["ecto.drop", "ecto.setup"], seeds: ["run priv/repo/seeds.exs"], - test: [ "ecto.reset", "test"] + test: ["ecto.reset", "test"] ] end end