From 8477d0cf5f2f2526bb3858ca7da26bffd8e98635 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Sat, 19 Feb 2022 19:26:48 +0100 Subject: fix URL construction when downloading definitions from Hydrilla --- html/install.js | 2 +- test/haketilo_test/world_wide_library.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/html/install.js b/html/install.js index 7b3f3fe..95388a3 100644 --- a/html/install.js +++ b/html/install.js @@ -181,7 +181,7 @@ function InstallView(tab_id, on_view_show, on_view_hide) { work.waiting++; const url = ver ? - `${this.repo_url}${item_type}/${id}/${ver.join(".")}.json` : + `${this.repo_url}${item_type}/${id}/${ver.join(".")}` : `${this.repo_url}${item_type}/${id}.json`; const response = await browser.tabs.sendMessage(tab_id, ["repo_query", url]); diff --git a/test/haketilo_test/world_wide_library.py b/test/haketilo_test/world_wide_library.py index 1eb826e..a932821 100644 --- a/test/haketilo_test/world_wide_library.py +++ b/test/haketilo_test/world_wide_library.py @@ -195,11 +195,11 @@ for srt in sample_resource_templates: (resource, resource_versions, sample_resources_catalog), (mapping, mapping_versions, sample_mappings_catalog) ]: - fmt = f'https://hydril.la/{item["type"]}/{item["identifier"]}%s.json' + fmt = f'https://hydril.la/{item["type"]}/{item["identifier"]}%s' # Make 2 versions of each item so that we can test updates. for ver in versions: item['version'] = ver - for fmt_arg in ('', '/' + item_version_string(item)): + for fmt_arg in ('.json', '/' + item_version_string(item)): catalog[fmt % fmt_arg] = make_handler(json.dumps(item)) def serve_query(command, get_params, post_params): -- cgit v1.2.3