Skip to content

Commit

Permalink
fix(server): fix download page using removed API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ericswpark committed Oct 11, 2023
1 parent ba422a4 commit 3ebe301
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/downloads/templates/downloads_build.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h2>{% translate "Mirrors" %}</h2>
const downloadURL = element.getAttribute("href");

const xhr = new XMLHttpRequest();
xhr.open('POST', "{% url 'v1_download_build_counter' %}", true);
xhr.open('POST', "{% url 'v2_download_build_counter' %}", true);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
Expand All @@ -129,6 +129,7 @@ <h2>{% translate "Mirrors" %}</h2>
xhr.send(JSON.stringify({
file_name: "{{ object.file_name }}",
build_id: {{ object.id }},
download_type: "download",
}));
})
});
Expand Down

0 comments on commit 3ebe301

Please sign in to comment.