Skip to content

Commit dab2735

Browse files
fix lint
1 parent 53bd448 commit dab2735

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

src/actions/challenge.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ function getSubmissionInformationDone(challengeId, submissionId, tokenV3) {
397397
* @desc Creates an action that signals beginning of fetching challenge statistics
398398
* @return {Action}
399399
*/
400-
function fetchChallengeStatisticsInit() {}
400+
function fetchChallengeStatisticsInit() {}
401401

402402
/**
403403
* @static
@@ -408,7 +408,7 @@ function getSubmissionInformationDone(challengeId, submissionId, tokenV3) {
408408
*/
409409
function fetchChallengeStatisticsDone(challengeId, tokenV3) {
410410
const challengeService = getChallengesService(tokenV3);
411-
return challengeService.getChallengeStatistics(challengeId)
411+
return challengeService.getChallengeStatistics(challengeId);
412412
}
413413

414414
export default createActions({

src/reducers/challenge.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -368,19 +368,6 @@ function onGetSubmissionInformationDone(state, action) {
368368
};
369369
}
370370

371-
/**
372-
* Handles CHALLENGE/GET_CHALLENGE_STATISTICS_INIT action.
373-
* @param {Object} state
374-
* @param {Object} action
375-
* @return {Object} New state.
376-
*/
377-
function onFetchChallengeStatisticsInit(state, action) {
378-
return {
379-
...state,
380-
statisticsData: [],
381-
};
382-
}
383-
384371
/**
385372
* Handles CHALLENGE/GET_CHALLENGE_STATISTICS_DONE action.
386373
* @param {Object} state Previous state.
@@ -444,7 +431,7 @@ function create(initialState) {
444431
[a.getActiveChallengesCountDone]: onGetActiveChallengesCountDone,
445432
[a.getSubmissionInformationInit]: onGetSubmissionInformationInit,
446433
[a.getSubmissionInformationDone]: onGetSubmissionInformationDone,
447-
[a.fetchChallengeStatisticsInit]: onFetchChallengeStatisticsInit,
434+
[a.fetchChallengeStatisticsInit]: state => state,
448435
[a.fetchChallengeStatisticsDone]: onFetchChallengeStatisticsDone,
449436
}, _.defaults(initialState, {
450437
details: null,
@@ -462,7 +449,7 @@ function create(initialState) {
462449
updatingChallengeUuid: '',
463450
mmSubmissions: [],
464451
submissionInformation: null,
465-
statisticsData: []
452+
statisticsData: [],
466453
}));
467454
}
468455

src/services/challenges.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ class ChallengesService {
258258
* @param {Number} challengeId
259259
* @return {Promise} The array of statistics
260260
*/
261-
async getChallengeStatistics (challengeId) {
261+
async getChallengeStatistics(challengeId) {
262262
return this.private.apiV5.get(`/challenges/${challengeId}/statistics`)
263263
.then(res => (res.ok ? res.json() : new Error(res.statusText)))
264264
.then(res => (

0 commit comments

Comments
 (0)