From 7d71bac82586ab0219ae579afa698c58f21a55a7 Mon Sep 17 00:00:00 2001 From: ChuYong Date: Sun, 5 Nov 2023 02:01:54 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=82=98=20=EC=9E=90=EC=8B=A0?= =?UTF-8?q?=EA=B3=BC=EC=9D=98=20=EC=BB=A8=EB=B2=A4=EC=85=98=20=EC=8B=B8?= =?UTF-8?q?=EC=9B=80..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presenter/restapi/controller/CafeRoomController.kt | 2 +- .../presenter/restapi/controller/CafeRoomReviewController.kt | 4 +--- .../presenter/restapi/controller/CafeSearchController.kt | 4 ++-- .../nagazaserver/presenter/restapi/controller/MeController.kt | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/CafeRoomController.kt b/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/CafeRoomController.kt index 7c04148..098d6b2 100644 --- a/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/CafeRoomController.kt +++ b/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/CafeRoomController.kt @@ -11,7 +11,7 @@ class CafeRoomController( ) : CafeRoomApi { override fun getCafeRooms(cafeId: String): List { return cafeRoomService.getRoomsByCafeId(cafeId) - .map { CafeRoomResponse.fromModel(it) } + .map(CafeRoomResponse::fromModel) } override fun getCafeRoom(cafeId: String, roomId: String): CafeRoomResponse { diff --git a/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/CafeRoomReviewController.kt b/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/CafeRoomReviewController.kt index 4046945..8bb798c 100644 --- a/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/CafeRoomReviewController.kt +++ b/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/CafeRoomReviewController.kt @@ -12,8 +12,6 @@ class CafeRoomReviewController( override fun getReviews(cafeId: String, roomId: String): List { return cafeRoomReviewService.getAllByRoomId( roomId = roomId, - ).map { - CafeRoomReviewResponse.fromModel(it) - } + ).map(CafeRoomReviewResponse::fromModel) } } diff --git a/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/CafeSearchController.kt b/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/CafeSearchController.kt index 81325cc..dd2ea77 100644 --- a/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/CafeSearchController.kt +++ b/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/CafeSearchController.kt @@ -13,14 +13,14 @@ class CafeSearchController( override fun searchCafe(query: String): List { return cafeService .searchCafeByQuery(query) - .map { CafeResponse.fromModel(it) } + .map(CafeResponse::fromModel) } override fun searchCafeByAddress(addressOne: String, addressTwo: String): List { return cafeService.getAllByAddresses( addressOne = addressOne, addressTwo = addressTwo, - ).map { CafeResponse.fromModel(it) } + ).map(CafeResponse::fromModel) } override fun getCafeAreaFilters(): List { diff --git a/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/MeController.kt b/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/MeController.kt index d4a3d49..2f827d8 100644 --- a/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/MeController.kt +++ b/src/main/kotlin/kr/nagaza/nagazaserver/presenter/restapi/controller/MeController.kt @@ -25,7 +25,7 @@ class MeController( override fun getMyReviews(userId: String): List { return cafeRoomReviewService .getAllByUserId(userId) - .map { CafeRoomReviewResponse.fromModel(it) } + .map(CafeRoomReviewResponse::fromModel) } override fun updateNickname(