2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

[FR] Move URL endpoints to API namespace (#4163)

* Move endpoints
[FR] Move download URL endpoints to API namespace
Fixes #3927

* rename endpoint ref name and update js

* update endpoint name and js

* rename endpoint and fix js

* add docstring
This commit is contained in:
Matthias Mair
2023-01-07 13:23:38 +01:00
committed by GitHub
parent 942086741e
commit 0e96654b6a
6 changed files with 22 additions and 18 deletions

View File

@ -293,7 +293,7 @@ function downloadBomTemplate(options={}) {
$(opts.modal).modal('hide');
// Download the file
location.href = `{% url "bom-upload-template" %}?format=${format}`;
location.href = `{% url "api-bom-upload-template" %}?format=${format}`;
}
});
@ -373,7 +373,7 @@ function exportBom(part_id, options={}) {
'pricing_data',
];
var url = `/part/${part_id}/bom-download/?`;
var url = `/api/part/${part_id}/bom-download/?`;
field_names.forEach(function(fn) {
var val = getFormFieldValue(fn, fields[fn], opts);