Skip to content

Commit 2c7d92d

Browse files
committed
Adding discussions to sanitization
1 parent cbb0bcd commit 2c7d92d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/services/ChallengeService.js

+3
Original file line numberDiff line numberDiff line change
@@ -1640,6 +1640,9 @@ function sanitizeChallenge (challenge) {
16401640
if (challenge.winners) {
16411641
sanitized.winners = _.map(challenge.winners, winner => _.pick(winner, ['userId', 'handle', 'placement']))
16421642
}
1643+
if (challenge.discussions) {
1644+
sanitized.discussions = _.map(challenge.discussions, discussion => _.pick(discussion, ['id', 'provider', 'name', 'type', 'url', 'options']))
1645+
}
16431646
if (challenge.terms) {
16441647
sanitized.terms = _.map(challenge.terms, term => _.pick(term, ['id', 'roleId']))
16451648
}

0 commit comments

Comments
 (0)