Skip to content

Commit a2bac24

Browse files
authored
Merge pull request #76 from haniffalab/feat/contributor-fields
Populate person and team fields for single study
2 parents 7045243 + d7b55c5 commit a2bac24

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

src/api/study/controllers/study.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,20 @@ module.exports = createCoreController('api::study.study', ({ strapi }) => ({
165165
filters: { person: { publishedAt: { $notNull: true } } },
166166
populate: {
167167
person: {
168-
fields: ['first_name', 'last_name'],
169-
populate: ['avatar'],
168+
fields: [
169+
'first_name',
170+
'last_name',
171+
'full_name',
172+
'email',
173+
'orcid_id',
174+
'position',
175+
],
176+
populate: {
177+
avatar: true,
178+
team: {
179+
fields: ['name', 'website'],
180+
},
181+
},
170182
},
171183
},
172184
},

0 commit comments

Comments
 (0)