aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Blowers <sblowers@findmypast.com>2016-09-16 14:19:46 (GMT)
committerSteven Blowers <sblowers@findmypast.com>2016-09-16 14:19:46 (GMT)
commit2587b9fda4ef351cfa3e05d3de1f76ee125f2914 (patch)
tree08b794d18ed902b0d0cad67ace08a60dcf640862
parent097ff72669669d46c087da7bf1b88136003299d7 (diff)
downloadzendex-2587b9fda4ef351cfa3e05d3de1f76ee125f2914.tar.gz
zendex-2587b9fda4ef351cfa3e05d3de1f76ee125f2914.tar.xz
refactoring create ticket logic
-rw-r--r--lib/zendex/ticket.ex12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/zendex/ticket.ex b/lib/zendex/ticket.ex
index 38c3fa0..6d2d75b 100644
--- a/lib/zendex/ticket.ex
+++ b/lib/zendex/ticket.ex
@@ -19,12 +19,12 @@ defmodule Zendex.Ticket do
@spec create(Zendex.Connection.t, map) :: map
def create(connection, ticket) do
- response = @http_client.post!(connection.base_url <> @url,
- Poison.encode!(ticket),
- headers(connection.authentication) ++
- [{"Content-Type", "application/json"}])
-
- CommonHelpers.decode_response(response)
+ connection.base_url
+ |> Kernel.<>(@url)
+ |> @http_client.post!(Poison.encode!(ticket),
+ headers(connection.authentication) ++
+ [{"Content-Type", "application/json"}])
+ |> CommonHelpers.decode_response
end
defp headers(authentication) do