Skip to content

Commit

Permalink
Merge pull request #163 from cyfronet-fid/fix/url
Browse files Browse the repository at this point in the history
fix: url fix for datasources
  • Loading branch information
tomaszandel authored Jun 29, 2023
2 parents 37f7ad8 + 486ee3f commit 0881a90
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,13 @@ const urlAdapter = (
return toArray<string>(data.url)[0] ?? '';
}
};
const SERVICES_AS_DATASOURCES = ['b2share', 'b2find', 'b2safe'];

export const hackDataSourceUrl = (pid?: string) => {
if (!pid) {
pid = '';
}

if (SERVICES_AS_DATASOURCES.includes(pid)) {
return `${environment.betaMarketplace}services/${pid}`;
}
return `${environment.betaMarketplace}datasources/${pid}`;
return `${environment.betaMarketplace}services/${pid}`;
};

export const adapter = (
Expand Down

0 comments on commit 0881a90

Please sign in to comment.