serializeRequestBody() was mis-applying the body.type parameter into its data.type output, instead of data.attributes.type where it would belong. This was breaking uploadTracks.create() because it passes in both a body.type and an options.type, e.g.:
{
data: {
type: 'subtitles', // This is wrong, should be 'upload_track'
attributes: { url_or_upload_request_id: 'test' } // This is missing 'subtitles'
}
}
serializeRequestBody()
was mis-applying thebody.type
parameter into itsdata.type
output, instead ofdata.attributes.type
where it would belong. This was breakinguploadTracks.create()
because it passes in both a body.type and an options.type, e.g.:That was incorrectly returning:
Fixed version instead returns: