Skip to content

Commit

Permalink
Merge pull request #112 from prography/Fix/timezone
Browse files Browse the repository at this point in the history
Fix: 현재 활동기수 조회 오류 해결
  • Loading branch information
linho1150 authored Jan 12, 2023
2 parents 475eea5 + d2e3f47 commit 8df8520
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/modules/generation/service/generation.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Injectable } from '@nestjs/common';
import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
import * as moment from 'moment';
import { Generations } from 'src/infra/entity/Generations.entity';
import { DeleteResult, UpdateResult } from 'typeorm';
Expand Down Expand Up @@ -57,6 +57,13 @@ export class GenerationService {
currentGenerationState.isActive = true;
}

if (
!currentGenerationState.isApplying &&
!currentGenerationState.isActive
) {
throw new HttpException('활동 기수가 없습니다.', HttpStatus.NOT_FOUND);
}

return { ...currentGeneration, ...currentGenerationState };
}

Expand Down

0 comments on commit 8df8520

Please sign in to comment.