Skip to content

Commit

Permalink
fix: update dashboard recommendations url
Browse files Browse the repository at this point in the history
Point cross product recommendations url from learner_recommendations to edx-recommendations plugin.

VAN-1596
  • Loading branch information
mubbsharanwar committed Aug 28, 2023
1 parent 1e9a0a8 commit 64563d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/widgets/ProductRecommendations/api.js
Original file line number Diff line number Diff line change
@@ -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()));

Expand Down
2 changes: 1 addition & 1 deletion src/widgets/RecommendationsPanel/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down

0 comments on commit 64563d5

Please sign in to comment.