Skip to content

Instantly share code, notes, and snippets.

@GesJeremie
Created Apr 23, 2017
Embed
What would you like to do?
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