Commit 49df6ed4 authored by Peter van der meulen's avatar Peter van der meulen

Default error handling back

parent 2762abe7
......@@ -64,7 +64,6 @@ defmodule SnugglesApp.Accounts do
defp create_user_from_eve_user(user_attrs) do
attrs = Map.merge(user_attrs, %{auth_token: generate_auth_token()})
IO.inspect attrs
%User{}
|> User.changeset(attrs)
......
......@@ -39,7 +39,7 @@ defmodule SnugglesAppWeb.UserController do
defp create_user(conn, code) do
case Accounts.create_user(code) do
{:ok, user} -> render(conn, "thanks.html", auth_token: user.auth_token)
# {:error, _} -> (conn |> put_flash(:info, "Something went wrong, lets try again") |> redirect(to: "/auth"))
{:error, _} -> (conn |> put_flash(:info, "Something went wrong, lets try again") |> redirect(to: "/auth"))
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment