diff --git a/src/main/kotlin/com/wafflestudio/csereal/core/notice/api/NoticeController.kt b/src/main/kotlin/com/wafflestudio/csereal/core/notice/api/NoticeController.kt index 94b95a0f..6c27588d 100644 --- a/src/main/kotlin/com/wafflestudio/csereal/core/notice/api/NoticeController.kt +++ b/src/main/kotlin/com/wafflestudio/csereal/core/notice/api/NoticeController.kt @@ -28,8 +28,8 @@ class NoticeController( fun searchNotice( @RequestParam(required = false) tag: List?, @RequestParam(required = false) keyword: String?, - @RequestParam(required = false) pageNum: Int?, - @RequestParam(required = false, defaultValue = "20") pageSize: Int, + @RequestParam(required = false) @Positive pageNum: Int?, + @RequestParam(required = false, defaultValue = "20") @Positive pageSize: Int, @RequestParam(required = false, defaultValue = "DATE") sortBy: String, authentication: Authentication? ): ResponseEntity { diff --git a/src/main/kotlin/com/wafflestudio/csereal/core/notice/database/TagInNoticeEnum.kt b/src/main/kotlin/com/wafflestudio/csereal/core/notice/database/TagInNoticeEnum.kt index 35576755..14c416f7 100644 --- a/src/main/kotlin/com/wafflestudio/csereal/core/notice/database/TagInNoticeEnum.kt +++ b/src/main/kotlin/com/wafflestudio/csereal/core/notice/database/TagInNoticeEnum.kt @@ -6,10 +6,10 @@ enum class TagInNoticeEnum(val krName: String) { CLASS("수업"), SCHOLARSHIP("장학"), UNDERGRADUATE("학사(학부)"), GRADUATE("학사(대학원)"), MINOR("다전공/전과"), REGISTRATIONS("등록/복학/휴학/재입학"), ADMISSIONS("입학"), GRADUATIONS("졸업"), RECRUIT("채용정보"), STUDENT_EXCHANGE("교환학생/유학"), INNER_EVENTS_PROGRAMS("내부행사/프로그램"), - OUTER_EVENTS_PROGRAMS("외부행사/프로그램"), FOREIGN("foreign"); + OUTER_EVENTS_PROGRAMS("외부행사/프로그램"), INTERNATIONAL("international"); companion object { - private val lookupMap: Map = values().associateBy(TagInNoticeEnum::krName) + private val lookupMap: Map = entries.associateBy(TagInNoticeEnum::krName) fun getTagEnum(t: String): TagInNoticeEnum { return lookupMap[t] ?: throw CserealException.Csereal404("태그를 찾을 수 없습니다: $t")