diff --git a/src/course/course.service.ts b/src/course/course.service.ts index 7059760..686fe7a 100644 --- a/src/course/course.service.ts +++ b/src/course/course.service.ts @@ -443,7 +443,7 @@ export class CourseService { ): Promise { const { keyword, cursorId, year, semester } = searchCoursesWithKeywordDto; - const LIMIT = 21; + const LIMIT = PaginatedCoursesDto.LIMIT; let queryBuilder = this.courseRepository .createQueryBuilder('course') diff --git a/src/course/dto/paginated-courses.dto.ts b/src/course/dto/paginated-courses.dto.ts index 446ef66..7c1818a 100644 --- a/src/course/dto/paginated-courses.dto.ts +++ b/src/course/dto/paginated-courses.dto.ts @@ -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;