Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/help-urls/data/thunks.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ import { RequestStatus } from '../../data/constants';
import { getHelpUrls } from './api';
import { updateLoadingHelpUrlsStatus, updatePages } from './slice';

// The backend `home` help token still resolves to a retired readthedocs page.
// Override it with the current Open edX educators quickstart until the backend
// help_tokens config is migrated to docs.openedx.org.
const HOME_HELP_URL_OVERRIDE = 'https://docs.openedx.org/en/latest/educators/quickstarts/build_a_course.html';

export function fetchHelpUrls() {
return async (dispatch) => {
dispatch(updateLoadingHelpUrlsStatus({ status: RequestStatus.IN_PROGRESS }));

try {
const urls = await getHelpUrls();

dispatch(updatePages(urls));
dispatch(updatePages({ ...urls, home: HOME_HELP_URL_OVERRIDE }));

dispatch(updateLoadingHelpUrlsStatus({ status: RequestStatus.SUCCESSFUL }));
return true;
Expand Down
Loading