add Studio base URL to configuration and add Proctored Exam Settings component (#4)

This commit is contained in:
Michael Roytman
2020-07-14 14:24:30 -04:00
committed by GitHub
parent fe6a26dde9
commit 500eba661e
8 changed files with 7666 additions and 6257 deletions

View File

@@ -0,0 +1,18 @@
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';
import { getConfig, ensureConfig } from '@edx/frontend-platform';
ensureConfig([
'STUDIO_BASE_URL',
], 'Studio API service');
const studioBaseUrl = getConfig().STUDIO_BASE_URL;
class StudioApiService {
static getProctoredExamSettingsData(courseID) {
const apiClient = getAuthenticatedHttpClient();
const url = `${studioBaseUrl}/api/contentstore/v1/proctored_exam_settings/${courseID}`;
return apiClient.get(url);
}
}
export default StudioApiService;