Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.cmdline
Commits
c63757b4
Commit
c63757b4
authored
Nov 28, 2019
by
Samuel GAIST
Browse files
[webapi] Fix URL building
The current implementation lost the path of the configured platform URL.
parent
bca02c60
Changes
1
Hide whitespace changes
Inline
Side-by-side
beat/cmdline/webapi.py
View file @
c63757b4
...
...
@@ -79,9 +79,14 @@ class WebAPI(object):
}
def
__build_url
(
self
,
path
):
url
=
"{schema}://{host}{path}"
.
format
(
schema
=
self
.
parsed
[
0
],
host
=
self
.
parsed
[
1
],
path
=
path
)
platform
=
self
.
parsed
.
geturl
()
if
platform
.
endswith
(
"/"
):
platform
=
platform
[:
-
1
]
if
path
.
startswith
(
"/"
):
path
=
path
[
1
:]
url
=
"{platform}/{path}"
.
format
(
platform
=
platform
,
path
=
path
)
return
url
def
get
(
self
,
path
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment