diff --git a/example_app/mix.exs b/example_app/mix.exs index 586aa55..0ee24de 100644 --- a/example_app/mix.exs +++ b/example_app/mix.exs @@ -29,11 +29,11 @@ defmodule ExampleApp.Mixfile do # # Type `mix help deps` for examples and options defp deps do - [{:phoenix, "~> 0.16"}, - {:phoenix_ecto, "~> 0.9"}, + [{:phoenix, "~> 1.0.3"}, + {:phoenix_ecto, "~> 1.1"}, {:postgrex, ">= 0.0.0"}, {:phoenix_html, "~> 2.0"}, - {:phoenix_live_reload, "~> 0.6", only: :dev}, + {:phoenix_live_reload, "~> 1.0", only: :dev}, {:cowboy, "~> 1.0"}, {:addict, path: "../"}] end diff --git a/example_app/mix.lock b/example_app/mix.lock index bbcf3f7..69b0b32 100644 --- a/example_app/mix.lock +++ b/example_app/mix.lock @@ -1,16 +1,16 @@ -%{"comeonin": {:hex, :comeonin, "1.1.2"}, - "cowboy": {:hex, :cowboy, "1.0.2"}, +%{"comeonin": {:hex, :comeonin, "1.3.1"}, + "cowboy": {:hex, :cowboy, "1.0.3"}, "cowlib": {:hex, :cowlib, "1.0.1"}, "decimal": {:hex, :decimal, "1.1.0"}, - "ecto": {:hex, :ecto, "0.16.0"}, + "ecto": {:hex, :ecto, "1.0.6"}, "fs": {:hex, :fs, "0.9.2"}, "mailgun": {:hex, :mailgun, "0.0.2"}, - "phoenix": {:hex, :phoenix, "0.16.1"}, - "phoenix_ecto": {:hex, :phoenix_ecto, "0.9.0"}, - "phoenix_html": {:hex, :phoenix_html, "2.1.1"}, - "phoenix_live_reload": {:hex, :phoenix_live_reload, "0.6.0"}, - "plug": {:hex, :plug, "1.0.0"}, - "poison": {:hex, :poison, "1.4.0"}, + "phoenix": {:hex, :phoenix, "1.0.3"}, + "phoenix_ecto": {:hex, :phoenix_ecto, "1.2.0"}, + "phoenix_html": {:hex, :phoenix_html, "2.2.0"}, + "phoenix_live_reload": {:hex, :phoenix_live_reload, "1.0.1"}, + "plug": {:hex, :plug, "1.0.2"}, + "poison": {:hex, :poison, "1.5.0"}, "poolboy": {:hex, :poolboy, "1.5.1"}, "postgrex": {:hex, :postgrex, "0.9.1"}, "ranch": {:hex, :ranch, "1.1.0"}} diff --git a/lib/addict/interactors/session_interactor.ex b/lib/addict/interactors/session_interactor.ex index 3525f23..2375158 100644 --- a/lib/addict/interactors/session_interactor.ex +++ b/lib/addict/interactors/session_interactor.ex @@ -5,6 +5,7 @@ defmodule Addict.SessionInteractor do conn = fetch_session(conn) |> put_status(201) |> create_session(user) + |> halt {conn, %{message: "user created", user: sanitize_user(user)}} end @@ -19,6 +20,7 @@ defmodule Addict.SessionInteractor do conn = fetch_session(conn) |> put_status(200) |> create_session(user) + |> halt {conn, %{message: "logged in", user: sanitize_user(user)}} end @@ -39,6 +41,7 @@ defmodule Addict.SessionInteractor do def password_recover({:ok, _}, conn) do conn = conn |> put_status(200) + |> halt {conn, %{message: "email sent"}} end @@ -51,6 +54,7 @@ defmodule Addict.SessionInteractor do def password_reset({:ok, _}, conn) do conn = conn |> put_status(200) + |> halt {conn, %{message: "password reset"}} end diff --git a/mix.exs b/mix.exs index 97c4cb0..2a52419 100644 --- a/mix.exs +++ b/mix.exs @@ -25,7 +25,7 @@ defmodule Addict.Mixfile do defp deps do [{:cowboy, "~> 1.0"}, - {:phoenix, ">= 0.15.0"}, + {:phoenix, ">= 1.0.3"}, {:ecto, "~> 1.0"}, {:comeonin, "~> 1.1" }, {:mailgun, "~> 0.0.2"}, diff --git a/mix.lock b/mix.lock index b3dc3b1..7bbaa84 100644 --- a/mix.lock +++ b/mix.lock @@ -1,12 +1,12 @@ -%{"comeonin": {:hex, :comeonin, "1.1.3"}, +%{"comeonin": {:hex, :comeonin, "1.3.1"}, "cowboy": {:hex, :cowboy, "1.0.3"}, "cowlib": {:hex, :cowlib, "1.0.1"}, "decimal": {:hex, :decimal, "1.1.0"}, - "earmark": {:hex, :earmark, "0.1.17"}, - "ecto": {:hex, :ecto, "1.0.3"}, + "earmark": {:hex, :earmark, "0.1.19"}, + "ecto": {:hex, :ecto, "1.0.6"}, "ex_doc": {:hex, :ex_doc, "0.7.3"}, "mailgun": {:hex, :mailgun, "0.0.2"}, - "phoenix": {:hex, :phoenix, "1.0.2"}, + "phoenix": {:hex, :phoenix, "1.0.3"}, "plug": {:hex, :plug, "1.0.2"}, "poison": {:hex, :poison, "1.5.0"}, "poolboy": {:hex, :poolboy, "1.5.1"},