-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds useCache prop to AuthenticatedPage, removes the use of cac… (
#232) * feat: adds useCache prop to AuthenticatedPage, removes the use of cache on LicenseActivationPage
- Loading branch information
Showing
5 changed files
with
20 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth'; | ||
import { getConfig } from '@edx/frontend-platform/config'; | ||
|
||
export function fetchEnterpriseCustomerConfigForSlug(slug) { | ||
export function fetchEnterpriseCustomerConfigForSlug(slug, useCache = true) { | ||
const config = getConfig(); | ||
const url = `${config.LMS_BASE_URL}/enterprise/api/v1/enterprise-customer/?slug=${slug}`; | ||
const httpClient = getAuthenticatedHttpClient({ | ||
useCache: config.USE_API_CACHE, | ||
useCache: useCache && config.USE_API_CACHE, | ||
}); | ||
return httpClient.get(url); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters