Skip to content

Commit

Permalink
Ensure all public content url generation allows for base url prefixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed Jun 23, 2022
1 parent 8075e8d commit 4c3488b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kolibri/core/content/utils/paths.py
Expand Up @@ -226,13 +226,13 @@ def get_content_server_url(path, baseurl=None):


def get_info_url(baseurl=None):
return get_content_server_url("/api/public/info", baseurl=baseurl)
return get_content_server_url("api/public/info", baseurl=baseurl)


def get_channel_lookup_url(
version="1", identifier=None, baseurl=None, keyword=None, language=None
):
content_server_path = "/api/public/v{}/channels".format(version)
content_server_path = "api/public/v{}/channels".format(version)
if identifier:
content_server_path += "/lookup/{}".format(identifier)
content_server_path += "?"
Expand All @@ -249,7 +249,7 @@ def get_channel_lookup_url(
def get_file_checksums_url(channel_id, baseurl, version="1"):
# This endpoint does not exist on Studio, so a baseurl is required.
return get_content_server_url(
"/api/public/v{version}/file_checksums/{channel_id}".format(
"api/public/v{version}/file_checksums/{channel_id}".format(
version=version, channel_id=channel_id
),
baseurl=baseurl,
Expand Down

0 comments on commit 4c3488b

Please sign in to comment.