fix: remove param from end of video features url
This commit is contained in:
@@ -290,7 +290,6 @@ export const fetchVideoFeatures = ({ ...rest }) => (dispatch, getState) => {
|
||||
requestKey: RequestKeys.fetchVideoFeatures,
|
||||
promise: api.fetchVideoFeatures({
|
||||
studioEndpointUrl: selectors.app.studioEndpointUrl(getState()),
|
||||
learningContextId: selectors.app.learningContextId(getState()),
|
||||
}),
|
||||
...rest,
|
||||
}));
|
||||
|
||||
@@ -486,7 +486,6 @@ describe('requests thunkActions module', () => {
|
||||
requestKey: RequestKeys.fetchVideoFeatures,
|
||||
promise: api.fetchVideoFeatures({
|
||||
studioEndpointUrl: selectors.app.studioEndpointUrl(testState),
|
||||
learningContextId: selectors.app.learningContextId(testState),
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
@@ -204,9 +204,8 @@ export const apiMethods = {
|
||||
),
|
||||
fetchVideoFeatures: ({
|
||||
studioEndpointUrl,
|
||||
learningContextId,
|
||||
}) => get(
|
||||
urls.videoFeatures({ studioEndpointUrl, learningContextId }),
|
||||
urls.videoFeatures({ studioEndpointUrl }),
|
||||
),
|
||||
uploadVideo: ({
|
||||
data,
|
||||
|
||||
@@ -575,7 +575,7 @@ describe('cms api', () => {
|
||||
});
|
||||
describe('fetchVideoFeatures', () => {
|
||||
it('should call get with url.videoFeatures', () => {
|
||||
const args = { studioEndpointUrl, learningContextId };
|
||||
const args = { studioEndpointUrl };
|
||||
apiMethods.fetchVideoFeatures({ ...args });
|
||||
expect(get).toHaveBeenCalledWith(urls.videoFeatures({ ...args }));
|
||||
});
|
||||
|
||||
@@ -139,7 +139,7 @@ export const fetchAdvanceSettings = ({ studioEndpointUrl, learningContextId }) =
|
||||
data: { allow_unsupported_xblocks: { value: true } },
|
||||
});
|
||||
// eslint-disable-next-line
|
||||
export const fetchVideoFeatures = ({ studioEndpointUrl, learningContextId }) => mockPromise({
|
||||
export const fetchVideoFeatures = ({ studioEndpointUrl }) => mockPromise({
|
||||
data: {
|
||||
allowThumbnailUpload: true,
|
||||
videoSharingEnabledForCourse: true,
|
||||
|
||||
@@ -63,8 +63,8 @@ export const courseAdvanceSettings = ({ studioEndpointUrl, learningContextId })
|
||||
`${studioEndpointUrl}/api/contentstore/v0/advanced_settings/${learningContextId}`
|
||||
);
|
||||
|
||||
export const videoFeatures = ({ studioEndpointUrl, learningContextId }) => (
|
||||
`${studioEndpointUrl}/video_features/${learningContextId}`
|
||||
export const videoFeatures = ({ studioEndpointUrl }) => (
|
||||
`${studioEndpointUrl}/video_features/`
|
||||
);
|
||||
|
||||
export const courseVideos = ({ studioEndpointUrl, learningContextId }) => (
|
||||
|
||||
@@ -135,8 +135,8 @@ describe('cms url methods', () => {
|
||||
});
|
||||
describe('videoFeatures', () => {
|
||||
it('returns url with studioEndpointUrl and learningContextId', () => {
|
||||
expect(videoFeatures({ studioEndpointUrl, learningContextId }))
|
||||
.toEqual(`${studioEndpointUrl}/video_features/${learningContextId}`);
|
||||
expect(videoFeatures({ studioEndpointUrl }))
|
||||
.toEqual(`${studioEndpointUrl}/video_features/`);
|
||||
});
|
||||
});
|
||||
describe('courseVideos', () => {
|
||||
|
||||
Reference in New Issue
Block a user