Skip to content
Open
Show file tree
Hide file tree
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
12 changes: 8 additions & 4 deletions apps/cyberstorm-remix/app/p/listingUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export interface ListingIdentifiers {
communityId: string;
namespaceId: string;
packageId: string;
packageVersion?: string;
}

/**
Expand All @@ -16,12 +17,13 @@ export async function getPublicListing(
dapper: DapperTs,
ids: ListingIdentifiers
) {
const { communityId, namespaceId, packageId } = ids;
const { communityId, namespaceId, packageId, packageVersion } = ids;
try {
return await dapper.getPackageListingDetails(
communityId,
namespaceId,
packageId
packageId,
packageVersion
);
} catch (e) {
if (isApiError(e) && e.response.status === 404) {
Expand All @@ -42,13 +44,14 @@ export async function getPrivateListing(
dapper: DapperTs,
ids: ListingIdentifiers
) {
const { communityId, namespaceId, packageId } = ids;
const { communityId, namespaceId, packageId, packageVersion } = ids;

try {
return await dapper.getPackageListingDetails(
communityId,
namespaceId,
packageId
packageId,
packageVersion
);
} catch (e) {
const is404 = isApiError(e) && e.response?.status === 404;
Expand All @@ -61,6 +64,7 @@ export async function getPrivateListing(
communityId,
namespaceId,
packageId,
packageVersion,
true
);

Expand Down
Loading
Loading