Skip to content

Commit 427dde2

Browse files
Putting back this (#669)
* Correcting error: removing this * Putting back *this* * Update challenge-helper.js to use the this keyword --------- Co-authored-by: Thomas Kranitsas <[email protected]>
1 parent d3f8b5d commit 427dde2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/common/challenge-helper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class ChallengeHelper {
119119
// check groups authorization
120120
if (challenge.groups && challenge.groups.length > 0) {
121121
if (currentUser.isMachine || hasAdminRole(currentUser)) {
122-
await validateGroups(challenge.groups);
122+
await this.validateGroups(challenge.groups);
123123
} else {
124124
await helper.ensureAccessibleByGroupsAccess(currentUser, challenge);
125125
}
@@ -145,7 +145,7 @@ class ChallengeHelper {
145145
// check groups access to be updated group values
146146
if (data.groups && data.groups.length > 0) {
147147
if (currentUser.isMachine || hasAdminRole(currentUser)) {
148-
await validateGroups(data.groups);
148+
await this.validateGroups(data.groups);
149149
} else {
150150
await ensureAcessibilityToModifiedGroups(currentUser, data, challenge);
151151
}

src/services/ChallengeService.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const { ChallengeDomain } = require("@topcoder-framework/domain-challenge");
3636

3737
const { hasAdminRole } = require("../common/role-helper");
3838
const {
39-
validateChallengeUpdateRequest,
4039
enrichChallengeForResponse,
4140
sanitizeRepeatedFieldsInUpdateRequest,
4241
convertPrizeSetValuesToCents,
@@ -1491,7 +1490,7 @@ async function updateChallenge(currentUser, challengeId, data) {
14911490

14921491
const challengeResources = await helper.getChallengeResources(challengeId);
14931492

1494-
await validateChallengeUpdateRequest(currentUser, challenge, data, challengeResources);
1493+
await challengeHelper.validateChallengeUpdateRequest(currentUser, challenge, data, challengeResources);
14951494
validateTask(currentUser, challenge, data, challengeResources);
14961495

14971496
let sendActivationEmail = false;

0 commit comments

Comments
 (0)