Skip to content

Commit

Permalink
feat: 경험 검색 API 정의
Browse files Browse the repository at this point in the history
  • Loading branch information
whereami2048 committed May 21, 2024
1 parent 20d0956 commit 7671660
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ExperienceGetService(
}

@Transactional(readOnly = true)
fun getAllBookMarkExperiences(jobDescriptionId: UUID): GetExperience.BookmarkResponse {
fun getAllBookmarkExperiences(jobDescriptionId: UUID): GetExperience.BookmarkResponse {
val experienceIds = bookMarkReader.readByStatusAndJobDescriptionId(jobDescriptionId, BookmarkStatus.ON).map { it.experienceId }

val userExperiences = experienceReader.readAllByUserId(getAuthenticationPrincipal())
Expand Down Expand Up @@ -139,4 +139,8 @@ class ExperienceGetService(
)
}
}

fun getBookmarkExperienceBySearch(search: String): GetExperience.BookmarkResponse {
return GetExperience.BookmarkResponse(emptyList())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ class ExperienceController(
@GetMapping(ExperienceApi.BOOKMARK_EXPERIENCE_URL)
fun getBookMarkExperiences(
@PathVariable("jobDescriptionId") jobDescriptionId: UUID,
) : GetExperience.BookmarkResponse {
return experienceGetService.getAllBookMarkExperiences(jobDescriptionId)
}
@RequestParam("search", required = false) search: String?,
) : GetExperience.BookmarkResponse =
when (search) {
null -> experienceGetService.getAllBookmarkExperiences(jobDescriptionId)

This comment has been minimized.

Copy link
@isprogrammingfun

isprogrammingfun May 21, 2024

Member

이거도 분기 application 안에서 해주라

else -> experienceGetService.getBookmarkExperienceBySearch(search)
}

@GetMapping(ExperienceApi.BASE_URL)
fun getExperienceByFilter(@RequestParam("year") year: Int,
Expand Down

0 comments on commit 7671660

Please sign in to comment.