Skip to content

Commit

Permalink
feat: update courseware search api name (#1507)
Browse files Browse the repository at this point in the history
  • Loading branch information
alangsto authored Oct 30, 2024
1 parent 2d1f893 commit 2d63a14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/course-home/data/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ export async function unsubscribeFromCourseGoal(token) {
.then(res => camelCaseObject(res));
}

export async function getCoursewareSearchEnabledFlag(courseId) {
export async function getCoursewareSearchEnabled(courseId) {
const url = new URL(`${getConfig().LMS_BASE_URL}/courses/${courseId}/courseware-search/enabled/`);
const { data } = await getAuthenticatedHttpClient().get(url.href);
return { enabled: data.enabled || false };
Expand Down
4 changes: 2 additions & 2 deletions src/course-home/data/thunks.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
postDismissWelcomeMessage,
postRequestCert,
getLiveTabIframe,
getCoursewareSearchEnabledFlag,
getCoursewareSearchEnabled,
searchCourseContentFromAPI,
} from './api';

Expand Down Expand Up @@ -159,7 +159,7 @@ export function processEvent(eventData, getTabData) {

export async function fetchCoursewareSearchSettings(courseId) {
try {
const { enabled } = await getCoursewareSearchEnabledFlag(courseId);
const { enabled } = await getCoursewareSearchEnabled(courseId);
return { enabled };
} catch (e) {
return { enabled: false };
Expand Down

0 comments on commit 2d63a14

Please sign in to comment.