Pass hash and extension in the DistributorCopyFile
payload instead of the URL
#28
Labels
breaking change
Changes to public functions that are not backwards compatible
consistency
An inconsistency that should be (re-)aligned
refactoring
Non-breaking changes that improve maintainability or readability
web api
Changes to the API exposed via HTTP endpoints
It seems it would be more consistent with the rest of the Distributor API, if the hash and extension of a file to be copied were passed in the already existing
DistributorCopyFile
payload model:videbo/src/videbo/distributor/api/models.py
Lines 35 to 37 in 2fc6190
They are currently part of the URL path in the form
/api/distributor/copy/<hash><ext>
.Aside from a more consistent interface, it would have the added benefit of making the payload model map nicely to the
CopyingVideoFile
constructor, which would further simplify both the logic and the call site ofDistributorFileController.schedule_copying
.videbo/src/videbo/distributor/api/routes.py
Lines 109 to 117 in 2fc6190
Since this would be a purely internal API change, there would be no implications for external clients/LMS.
We would only have to adjust the implementation of the
DistributorClient.copy
method, which depends on the distributor API.The text was updated successfully, but these errors were encountered: