Skip to content

Commit

Permalink
Merge pull request #64 from bigbassroller/master
Browse files Browse the repository at this point in the history
Update Ecto and Fix Response Being Sent Twice
  • Loading branch information
trenpixster committed Dec 8, 2015
2 parents dfb20b7 + a83c2a9 commit d8e3b53
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 17 deletions.
6 changes: 3 additions & 3 deletions example_app/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions example_app/mix.lock
Original file line number Diff line number Diff line change
@@ -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"}}
4 changes: 4 additions & 0 deletions lib/addict/interactors/session_interactor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
8 changes: 4 additions & 4 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -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"},
Expand Down

0 comments on commit d8e3b53

Please sign in to comment.