From 20a49b1b6c8b1182c1f60022961b27752dbc1376 Mon Sep 17 00:00:00 2001 From: huGgW Date: Tue, 19 Mar 2024 01:52:57 +0900 Subject: [PATCH] Fix: Add studentType for all academic search result. --- .../core/academics/api/res/AcademicsSearchResElement.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/wafflestudio/csereal/core/academics/api/res/AcademicsSearchResElement.kt b/src/main/kotlin/com/wafflestudio/csereal/core/academics/api/res/AcademicsSearchResElement.kt index 452666c5..e88522b6 100644 --- a/src/main/kotlin/com/wafflestudio/csereal/core/academics/api/res/AcademicsSearchResElement.kt +++ b/src/main/kotlin/com/wafflestudio/csereal/core/academics/api/res/AcademicsSearchResElement.kt @@ -13,7 +13,7 @@ data class AcademicsSearchResElement( val language: String, val name: String, val postType: AcademicsSearchType, - val studentType: AcademicsStudentType? = null, + val studentType: AcademicsStudentType, val academicType: AcademicsPostType? = null, val partialDescription: String, val boldStartIndex: Int, @@ -66,6 +66,7 @@ data class AcademicsSearchResElement( LanguageType.makeLowercase(it) }, postType = AcademicsSearchType.COURSE, + studentType = academicsSearch.course!!.studentType, partialDescription = partialDescription.replace("\n", " "), boldStartIndex = startIdx ?: 0, boldEndIndex = startIdx?.plus(keyword.length) ?: 0 @@ -87,6 +88,7 @@ data class AcademicsSearchResElement( LanguageType.makeLowercase(it) }, postType = AcademicsSearchType.SCHOLARSHIP, + studentType = academicsSearch.scholarship!!.studentType, partialDescription = partialDescription.replace("\n", " "), boldStartIndex = startIdx ?: 0, boldEndIndex = startIdx?.plus(keyword.length) ?: 0