frontend_v2/src/app/services/challenge.service.ts
File challenge.service.ts
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { NGXLogger } from 'ngx-logger';
import { Router } from '@angular/router';
ChallengeService
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Injectable()
export class ChallengeService {
private defaultChallenge: any = { creator: {} };
private defaultStars: any = { count: 0, is_starred: false };
private defaultPublishChallenge: any = {
Function fetchChallenge
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fetchChallenge(id) {
const API_PATH = this.endpointsService.challengeDetailsURL(id);
const SELF = this;
this.changeCurrentPhases([]);
this.changeCurrentPhaseSplit([]);
Function fetchParticipantTeams
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private fetchParticipantTeams(id) {
const API_PATH = this.endpointsService.challengeParticipantTeamsURL(id);
const SELF = this;
this.apiService.getUrl(API_PATH).subscribe(
(data) => {