Skip to content

Commit

Permalink
fix:: 하드코딩된 변수 dto에 static으로 선언
Browse files Browse the repository at this point in the history
  • Loading branch information
JeongYeonSeung committed Nov 30, 2024
1 parent 5e36f6d commit 21582bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/course/course.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ export class CourseService {
): Promise<CourseEntity[]> {
const { keyword, cursorId, year, semester } = searchCoursesWithKeywordDto;

const LIMIT = 21;
const LIMIT = PaginatedCoursesDto.LIMIT;

let queryBuilder = this.courseRepository
.createQueryBuilder('course')
Expand Down
2 changes: 2 additions & 0 deletions src/course/dto/paginated-courses.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { ApiProperty } from '@nestjs/swagger';
import { CommonCourseResponseDto } from './common-course-response.dto';

export class PaginatedCoursesDto {
static readonly LIMIT = 21;

@ApiProperty({ description: '다음 페이지 존재 여부' })
hasNextPage: boolean;

Expand Down

0 comments on commit 21582bb

Please sign in to comment.