Skip to content

Commit

Permalink
fix: url fix for datasources
Browse files Browse the repository at this point in the history
  • Loading branch information
DEV committed Jun 28, 2023
1 parent 01aef5b commit 486ee3f
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 486ee3f

Please sign in to comment.