Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/api/challenges/challenges.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class ChallengesService {
description:
challenge.type === 'Task'
? challenge.name
: `${challenge.name} - ${placeToOrdinal(winner.placement)} Place`,
: `${challenge.name} - ${type === WinningsCategory.CONTEST_CHECKPOINT_PAYMENT ? 'Checkpoint ' : ''}${placeToOrdinal(winner.placement)} Place`,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The variable type is used here without being declared or initialized in the visible context. Ensure that type is correctly defined and available in this scope to avoid potential runtime errors.

}));
}

Expand Down Expand Up @@ -220,6 +220,7 @@ export class ChallengesService {
amount: copilotPrizes[0].value,
userId: copilot.memberId.toString(),
type: WinningsCategory.COPILOT_PAYMENT,
description: `${challenge.name} - Copilot payment`,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ security]
Consider sanitizing challenge.name to prevent potential injection attacks if this value is used in contexts that could be vulnerable to such attacks.

}));
}

Expand Down