Basic discussions forum framework

Adds the basic structure for the Discussions MFE around which future development
will happen.
This commit is contained in:
Kshitij Sobti
2020-08-18 16:58:48 +05:30
parent 56d68e76ad
commit 491f7b7acd
58 changed files with 9313 additions and 4194 deletions

View File

@@ -0,0 +1,13 @@
/* eslint-disable import/prefer-default-export */
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';
import { API_BASE_URL } from '../../../data/constants';
export async function getCourseTopics(courseId, topicIds) {
const url = new URL(`${API_BASE_URL}/api/discussion/v1/course_topics/${courseId}`);
if (topicIds) {
url.searchParams.append('topic_id', topicIds.join(','));
}
const { data } = await getAuthenticatedHttpClient()
.get(url);
return data;
}