Skip to content

Commit 8f5ff61

Browse files
authored
Merge pull request #60 from farhatahmad/double-slash
Prevent double slash on api calls
2 parents c00f8c6 + 56dc137 commit 8f5ff61

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/bigbluebutton_api.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,8 +691,10 @@ def get_url(method, params={})
691691
params_string = "checksum=#{checksum}&#{params_string}"
692692
return "#{@url}/#{method}", params_string
693693
else
694-
url = "#{@url}/#{method}?"
695-
url += "#{params_string}&" unless params_string.empty?
694+
url = @url
695+
url += "/" unless url.end_with?("/")
696+
url += method.to_s
697+
url += "?#{params_string}&" unless params_string.empty?
696698
url += "checksum=#{checksum}"
697699
return url, nil
698700
end

0 commit comments

Comments
 (0)