Skip to content

Commit

Permalink
fix: 오타 수정, 메서드명 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
rladydgn committed Dec 2, 2023
1 parent a4f6ace commit 5ef8c64
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class CompetitionGateWay implements OnGatewayConnection, OnGatewayInit {
client.handshake.auth.token,
);
const user: User = await this.userService.getByEmail(authTokenPayloadDto.sub);
const testcaseNum: number = await this.problemService.getProblenTestcaseNum(
const testcaseNum: number = await this.problemService.getProblemTestcaseNum(
createSubmissionDto.problemId,
);
this.competitionService.scoreSubmission(createSubmissionDto, client.id, user);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export class CompetitionService {
this.submissionRepository.save(submission);

// 모두 제출했는지 확인
const testcaseNum: number = await this.problemService.getProblenTestcaseNum(
const testcaseNum: number = await this.problemService.getProblemTestcaseNum(
submission.problemId,
);
let totalResult: keyof typeof RESULT = 'CORRECT';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class ProblemService {
return ProblemResponseDto.from(problem, content);
}

async getProblenTestcaseNum(id: number) {
async getProblemTestcaseNum(id: number) {
const problem = await this.problemRepository.findOneBy({ id });
return problem.testcaseNum;
}
Expand Down
4 changes: 2 additions & 2 deletions be/algo-with-me-api/src/dashboard/dashboard.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class DashboardService {
const record = await JSON.parse(await this.redis.get(recordKey));
console.log(record);

if (this.isCorrected(record, problemId)) return;
if (this.isAlreadyCorrect(record, problemId)) return;

if (result !== RESULT.CORRECT) {
record[problemId] = -1;
Expand Down Expand Up @@ -150,7 +150,7 @@ export class DashboardService {
}
}

isCorrected(value: object, problemId: number) {
isAlreadyCorrect(value: object, problemId: number) {
if (value[problemId] === null || Number(value[problemId]) === -1) return false;
return true;
}
Expand Down

0 comments on commit 5ef8c64

Please sign in to comment.