From 2d63a14c2ec07a1a57901305b420b27050044321 Mon Sep 17 00:00:00 2001 From: Alison Langston <46360176+alangsto@users.noreply.github.com> Date: Wed, 30 Oct 2024 08:52:54 -0400 Subject: [PATCH] feat: update courseware search api name (#1507) --- src/course-home/data/api.js | 2 +- src/course-home/data/thunks.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/course-home/data/api.js b/src/course-home/data/api.js index 22b6738df4..108c4e3951 100644 --- a/src/course-home/data/api.js +++ b/src/course-home/data/api.js @@ -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 }; diff --git a/src/course-home/data/thunks.js b/src/course-home/data/thunks.js index ec0567f9cf..4dd3658e53 100644 --- a/src/course-home/data/thunks.js +++ b/src/course-home/data/thunks.js @@ -12,7 +12,7 @@ import { postDismissWelcomeMessage, postRequestCert, getLiveTabIframe, - getCoursewareSearchEnabledFlag, + getCoursewareSearchEnabled, searchCourseContentFromAPI, } from './api'; @@ -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 };