research-software-directory / RSD-as-a-service

This repo contains the new RSD-as-a-service implementation
https://research.software
22 stars 15 forks source link

fix: only call ORCID well known endpoint on settings page #1105

Closed ewan-escience closed 5 months ago

ewan-escience commented 5 months ago

Fix ORCID requests

Changes proposed in this pull request:

How to test:

Note: It would be better to only fetch the data when needed when clicking the button, or asynchronously in the background. It might also be good to use caching. However, this PR only implements the minimum necessary, as this code is also being worked on in #1100.

Closes #1103

PR Checklist:

sonarcloud[bot] commented 5 months ago

Quality Gate Failed Quality Gate failed for 'rsd-frontend'

Failed conditions

27.8% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

dmijatovic commented 5 months ago

Just for the protocol: using this implementation, the LinkOrcid button only is shown if ORCID_REDIRECT_COUPLE is defined.

That is correct. We can apply additional logic in the apiLinkOrcidProps methods if needed.

ewan-escience commented 5 months ago

It is good to write down here that this PR now also contains caching.