Skip to content

Commit

Permalink
Do not add ampersand at end of URL with no params
Browse files Browse the repository at this point in the history
  • Loading branch information
jsmestad committed May 15, 2024
1 parent 1a544fb commit 2b13f92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/ueberauth/strategy/slack_v2/oauth.ex
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ defmodule Ueberauth.Strategy.SlackV2.OAuth do
|> endpoint(client)

final_endpoint =
if params do
client_endpoint <> "?" <> URI.encode_query(params)
else
if Enum.empty?(params) do
client_endpoint
else
client_endpoint <> "?" <> URI.encode_query(params)
end

final_endpoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
{
"request": {
"url": "https://slack.com/api/auth.test?&"
"url": "https://slack.com/api/auth.test?"
},
"response": {
"status_code": 200,
Expand Down

0 comments on commit 2b13f92

Please sign in to comment.