Skip to content

Commit

Permalink
Fix syntax in post_login callback registration example
Browse files Browse the repository at this point in the history
The earlier syntax didn't work. It said that a function was expected and a tuple was given. Doing the fix shown here made it work. 

My deps for reference 

    [{:phoenix, "~> 1.2.1"},
     {:phoenix_pubsub, "~> 1.0"},
     {:phoenix_ecto, "~> 3.0"},
     {:postgrex, ">= 0.0.0"},
     {:phoenix_html, "~> 2.6"},
     {:phoenix_live_reload, "~> 1.0", only: :dev},
     {:gettext, "~> 0.11"},
     {:addict, "~> 0.3"},
     {:guardian, "~> 0.14"},
     {:mailgun, github: "chrismccord/mailgun", branch: "master", override: true},

     {:cowboy, "~> 1.0"}]
  • Loading branch information
MaxPleaner authored Jan 27, 2017
1 parent d4abf5d commit 8c36f5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ And add it to the configuration:

config :addict,
(...),
post_login: {MyApp.PostLoginAction, :log}
post_login: &(MyApp.PostLoginAction.log/3)
```

If you want to take different flows according to the success criteria of the action, you can pattern match the arguments:
Expand Down Expand Up @@ -161,4 +161,4 @@ After the password reset email is sent, the reset token will expire in 1 day (86
config :addict,
(...),
password_reset_token_time_to_expiry: 120
```
```

0 comments on commit 8c36f5d

Please sign in to comment.