Skip to content

Commit 3bd81ad

Browse files
committed
use param to expose /content/published
Issue: AAH-2335
1 parent bd71120 commit 3bd81ad

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/containers/token/token-insights.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ class TokenInsights extends React.Component<RouteProps, IState> {
181181
documentation.
182182
</Trans>
183183
</p>
184-
<ClipboardCopy isReadOnly>{getRepoURL('published')}</ClipboardCopy>
184+
<ClipboardCopy isReadOnly>
185+
{getRepoURL('published', true)}
186+
</ClipboardCopy>
185187
</section>
186188
<section className='body pf-c-content'>
187189
<h2>{t`SSO URL`}</h2>

src/utilities/get-repo-url.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Returns the API path for a specific repository
2-
export function getRepoURL(distribution_base_path) {
2+
export function getRepoURL(distribution_base_path, view_published = false) {
33
// If the api is hosted on another URL, use API_HOST as the host part of the URL.
44
// Otherwise use the host that the UI is served from
55
const host = API_HOST ? API_HOST : window.location.origin;
66

77
// repo/distro "published" is special; not related to repo pipeline type
8-
if (distribution_base_path === 'published') {
8+
if (distribution_base_path === 'published' && view_published === false) {
99
return `${host}${API_BASE_PATH}`;
1010
}
1111

0 commit comments

Comments
 (0)