From 64563d58f979cbae1be208c94cd1d2fa8f67af92 Mon Sep 17 00:00:00 2001 From: mubbsharanwar Date: Thu, 24 Aug 2023 17:55:05 +0500 Subject: [PATCH] fix: update dashboard recommendations url Point cross product recommendations url from learner_recommendations to edx-recommendations plugin. VAN-1596 --- src/widgets/ProductRecommendations/api.js | 6 +++--- src/widgets/RecommendationsPanel/api.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/widgets/ProductRecommendations/api.js b/src/widgets/ProductRecommendations/api.js index b1e15e50..22d45f38 100644 --- a/src/widgets/ProductRecommendations/api.js +++ b/src/widgets/ProductRecommendations/api.js @@ -1,9 +1,9 @@ import { get, stringifyUrl } from 'data/services/lms/utils'; import urls from 'data/services/lms/urls'; -export const crossProductAndAmplitudeRecommendationsUrl = (courseId) => `${urls.getApiUrl()}/learner_recommendations/product_recommendations/${courseId}/`; -export const amplitudeRecommendationsUrl = () => `${urls.getApiUrl()}/learner_recommendations/product_recommendations/`; -export const recommendationsContextUrl = () => `${urls.getApiUrl()}/learner_recommendations/recommendations_context/`; +export const crossProductAndAmplitudeRecommendationsUrl = (courseId) => `${urls.getApiUrl()}/edx_recommendations/learner_dashboard/cross_product/${courseId}/`; +export const amplitudeRecommendationsUrl = () => `${urls.getApiUrl()}/edx_recommendations/learner_dashboard/amplitude/v2/`; +export const recommendationsContextUrl = () => `${urls.getApiUrl()}/edx_recommendations/learner_dashboard/recommendations_context/`; const fetchRecommendationsContext = () => get(stringifyUrl(recommendationsContextUrl())); diff --git a/src/widgets/RecommendationsPanel/api.js b/src/widgets/RecommendationsPanel/api.js index bf023c79..ad5b035d 100644 --- a/src/widgets/RecommendationsPanel/api.js +++ b/src/widgets/RecommendationsPanel/api.js @@ -2,7 +2,7 @@ import { StrictDict } from 'utils'; import { get, stringifyUrl } from 'data/services/lms/utils'; import urls from 'data/services/lms/urls'; -export const getFetchUrl = () => (`${urls.getApiUrl()}/api/edx_recommendations/learner_dashboard/amplitude/`); +export const getFetchUrl = () => (`${urls.getApiUrl()}/edx_recommendations/learner_dashboard/amplitude/`); export const apiKeys = StrictDict({ user: 'user' }); const fetchRecommendedCourses = () => get(stringifyUrl(getFetchUrl()));