Skip to content

Commit b4d7b02

Browse files
committed
fix: handle closing challenge when winner is found
1 parent 4d3d794 commit b4d7b02

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/ChallengeService.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2256,7 +2256,7 @@ async function advancePhase(currentUser, challengeId, data) {
22562256
// TODO: This is a temporary solution to update the challenge status to Completed; We currently do not have a way to get winner list using v5 data
22572257
// TODO: With the implementation of v5 review API we'll develop a mechanism to maintain the winner list in v5 data that challenge-api can use to create the winners list
22582258
if (phaseAdvancerResult.hasWinningSubmission === true) {
2259-
challengeDomain.update(
2259+
await challengeDomain.update(
22602260
{
22612261
filterCriteria: getScanCriteria({ id: challengeId }),
22622262
updateInput: {
@@ -2265,6 +2265,7 @@ async function advancePhase(currentUser, challengeId, data) {
22652265
},
22662266
grpcMetadata
22672267
);
2268+
// Indexing in Kafka is not necessary here since domain-challenge will do it
22682269
}
22692270

22702271
return {

0 commit comments

Comments
 (0)