Created
April 23, 2017 16:25
-
-
Save GesJeremie/248c0fda9fcbfd1a3e5610eb018e6830 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_contact(conn, %{"classified_contact" => params, "id" => id}) do | |
with {:ok, conn} <- CreateContactOperation.run(conn, params, %{classified_id: id}) do | |
conn | |
|> redirect(to: app_classified_path(conn, :show, id)) | |
else | |
{:error, conn} -> | |
conn | |
|> show(%{"id" => id}) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment