The two functions removed here are duplicated (and actually used from) course-blocks/api.js. Think it was just a refactoring oversight from a few weeks ago.
11 lines
474 B
JavaScript
11 lines
474 B
JavaScript
/* eslint-disable import/prefer-default-export */
|
|
import { getConfig, camelCaseObject } from '@edx/frontend-platform';
|
|
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';
|
|
|
|
export async function getCourseMetadata(courseUsageKey) {
|
|
const url = `${getConfig().LMS_BASE_URL}/api/courseware/course/${courseUsageKey}`;
|
|
const { data } = await getAuthenticatedHttpClient().get(url);
|
|
const processedData = camelCaseObject(data);
|
|
return processedData;
|
|
}
|