Skip to content

Commit

Permalink
Merge pull request #2917 from DFE-Digital/CPDLP-1913
Browse files Browse the repository at this point in the history
[CPDLP-1913] Restrict participants endpoint fields
  • Loading branch information
tvararu committed Jan 22, 2023
2 parents 8eaba67 + 83347f3 commit 32af71f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/services/api/v1/ecf/participants_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,19 @@ def induction_records
},
)

necessary_fields = %i[
induction_programme_id
induction_status
mentor_profile_id
participant_profile_id
preferred_identity_id
schedule_id
training_status
updated_at
]

scope = InductionRecord
.select(*necessary_fields)
.references(participant_profile: %i[participant_identity])
.includes(
:preferred_identity,
Expand Down

0 comments on commit 32af71f

Please sign in to comment.