Skip to content

Commit

Permalink
repositoryBasePath for querying collection api
Browse files Browse the repository at this point in the history
  • Loading branch information
himdel committed Aug 11, 2023
1 parent 22c2005 commit ea62bd3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/containers/collection-detail/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
} from 'src/api';
import { AlertType } from 'src/components';
import { Paths, formatPath } from 'src/paths';
import { repositoryBasePath } from 'src/utilities';

export interface IBaseCollectionState {
actuallyCollection?: CollectionDetailType;
Expand Down Expand Up @@ -98,12 +99,9 @@ export function loadCollection({
.then(({ data }) => data)
.catch(() => ({ data: [], meta: { count: 0 } }));

// FIXME: repo -> base_path
const actuallyCollection = CollectionAPI.getDetail(
repo,
namespace,
name,
).then(({ data }) => data);
const actuallyCollection = repositoryBasePath(repo)
.then((basePath) => CollectionAPI.getDetail(basePath, namespace, name))
.then(({ data }) => data);

return Promise.all([
versions,
Expand Down

0 comments on commit ea62bd3

Please sign in to comment.