Skip to content

Commit

Permalink
always show the mutation aligner link for domains (#4942)
Browse files Browse the repository at this point in the history
  • Loading branch information
onursumer authored Jul 11, 2024
1 parent a9531ef commit 19812bf
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions packages/react-mutation-mapper/src/cache/MutationAlignerCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,24 @@ export class MutationAlignerCache extends DefaultStringQueryCache<string> {
}

public fetch(pfamAccession: string): Promise<string> {
return fetchMutationAlignerLink(
pfamAccession,
this.mutationAlignerUrlTemplate
)
.then(res =>
Promise.resolve(
`http://mutationaligner.org/domains/${res.body.pfamId}`
)
)
.catch(e => Promise.reject(e));
// The code below is only to check if there is data for a specific domain
// Since mutation aligner is not HTTPS we need to use proxy for that
// We can enable this check again if we can directly query the API
// For now we just return the link without checking the existence of the data

// return fetchMutationAlignerLink(
// pfamAccession,
// this.mutationAlignerUrlTemplate
// )
// .then(res =>
// Promise.resolve(
// `http://mutationaligner.org/domains/${res.body.pfamId}`
// )
// )
// .catch(e => Promise.reject(e));

return Promise.resolve(
`http://mutationaligner.org/domains/${pfamAccession}`
);
}
}

0 comments on commit 19812bf

Please sign in to comment.