Update oauth.ex (#7)

Rewrite a conditional to avoid compiler notifications.
This commit is contained in:
Michael 2016-07-27 20:05:54 +03:00 committed by Sean Callan
parent 3ca733164e
commit fdc7fe26fa
1 changed files with 7 additions and 4 deletions

View File

@ -100,10 +100,13 @@ defmodule Ueberauth.Strategy.Twitter.OAuth do
client
|> Map.get(endpoint, endpoint)
|> endpoint(client)
unless params == nil do
endpoint = endpoint <> "?" <> URI.encode_query(params)
end
endpoint =
if params do
endpoint <> "?" <> URI.encode_query(params)
else
endpoint
end
endpoint
end