Realigning and simplifying directories and naming. - Combining “containers” into “components”. - Flattening out “data” into “reducers” and “config” to consolidate configuration-like files in one place and to make reducers a peer of its teammates (components, actions, sagas, and services). - Creating dev/prod-specific redux configurations. - Converting “index.jsx” files into files named for their contents. - Splitting up the top-level “index.jsx” file into an entry point and an “App” component. - Renaming SCSS file to “index.scss” to keep it consistent with where it’s imported. - Renaming/simplifying some variables.
17 lines
588 B
JavaScript
17 lines
588 B
JavaScript
import { getAuthenticatedAPIClient } from '@edx/frontend-auth';
|
|
|
|
import { configuration } from './environment';
|
|
|
|
const apiClient = getAuthenticatedAPIClient({
|
|
appBaseUrl: configuration.BASE_URL,
|
|
authBaseUrl: process.env.LMS_BASE_URL,
|
|
loginUrl: configuration.LOGIN_URL,
|
|
logoutUrl: configuration.LOGOUT_URL,
|
|
csrfTokenApiPath: process.env.CSRF_TOKEN_API_PATH,
|
|
refreshAccessTokenEndpoint: configuration.REFRESH_ACCESS_TOKEN_ENDPOINT,
|
|
accessTokenCookieName: configuration.ACCESS_TOKEN_COOKIE_NAME,
|
|
csrfCookieName: configuration.CSRF_COOKIE_NAME,
|
|
});
|
|
|
|
export default apiClient;
|