Skip to content

Commit

Permalink
refactor: 나 자신과의 컨벤션 싸움..
Browse files Browse the repository at this point in the history
  • Loading branch information
CChuYong committed Nov 4, 2023
1 parent 9cd3241 commit 7d71bac
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CafeRoomController(
) : CafeRoomApi {
override fun getCafeRooms(cafeId: String): List<CafeRoomResponse> {
return cafeRoomService.getRoomsByCafeId(cafeId)
.map { CafeRoomResponse.fromModel(it) }
.map(CafeRoomResponse::fromModel)
}

override fun getCafeRoom(cafeId: String, roomId: String): CafeRoomResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class CafeRoomReviewController(
override fun getReviews(cafeId: String, roomId: String): List<CafeRoomReviewResponse> {
return cafeRoomReviewService.getAllByRoomId(
roomId = roomId,
).map {
CafeRoomReviewResponse.fromModel(it)
}
).map(CafeRoomReviewResponse::fromModel)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ class CafeSearchController(
override fun searchCafe(query: String): List<CafeResponse> {
return cafeService
.searchCafeByQuery(query)
.map { CafeResponse.fromModel(it) }
.map(CafeResponse::fromModel)
}

override fun searchCafeByAddress(addressOne: String, addressTwo: String): List<CafeResponse> {
return cafeService.getAllByAddresses(
addressOne = addressOne,
addressTwo = addressTwo,
).map { CafeResponse.fromModel(it) }
).map(CafeResponse::fromModel)
}

override fun getCafeAreaFilters(): List<CafeAreaFilterResponse> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class MeController(
override fun getMyReviews(userId: String): List<CafeRoomReviewResponse> {
return cafeRoomReviewService
.getAllByUserId(userId)
.map { CafeRoomReviewResponse.fromModel(it) }
.map(CafeRoomReviewResponse::fromModel)
}

override fun updateNickname(
Expand Down

0 comments on commit 7d71bac

Please sign in to comment.