Skip to content

Commit

Permalink
Merge pull request #245 from KPMP/KPMP-4959_UpdateParticipantReport
Browse files Browse the repository at this point in the history
KPMP-4959: Get rid of extra endpoint that was not needed
  • Loading branch information
zwright authored Feb 14, 2024
2 parents 422d9be + 9d81504 commit e3ea634
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/helpers/Api.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export const fetchParticipantExperimentCounts = async (redcapId) => {

export const fetchParticipantClinicalDataset = async (redcapId) => {
const query = gql`
query participantClinicalDataset($redcapId: String) {
participantClinicalDataset(redcapId: $redcapId){
query participantSummaryDataset($redcapId: String) {
participantSummaryDataset(redcapId: $redcapId){
clinicalData
}
}`;
Expand All @@ -78,9 +78,9 @@ export const fetchParticipantClinicalDataset = async (redcapId) => {
redcapId: redcapId
}
});
if (response && response.data && response.data.participantClinicalDataset) {
return response.data.participantClinicalDataset;
if (response && response.data && response.data.participantSummaryDataset) {
return response.data.participantSummaryDataset;
} else {
store.dispatch(sendMessageToBackend("Could not retrieve participantClinicalDataset: " + response.error));
store.dispatch(sendMessageToBackend("Could not retrieve participantSummaryDataset (clinical data): " + response.error));
}
};

0 comments on commit e3ea634

Please sign in to comment.