Skip to content

Commit

Permalink
mod:: 강의 열람 로직 초 단위로 체크하도록 변경
Browse files Browse the repository at this point in the history
- 초 단위로 체크해서 더 엄밀하게 강의평 열람권 기한 정의
  • Loading branch information
Devheun committed Aug 31, 2024
1 parent 9925e48 commit 46a3b5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/course-review/course-review.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ export class CourseReviewService {

// 해당 과목의 강의평들 조회 (유저가 열람권 구매 안했으면 열람 불가 )
const viewableUser = await this.userService.findUserById(user.id);
if (viewableUser.viewableUntil.getDate() < koreaTime.getDate()) {

if (viewableUser.viewableUntil <= koreaTime) {
throw new ForbiddenException('열람권을 구매해야 합니다.');
}

Expand Down

0 comments on commit 46a3b5e

Please sign in to comment.