Skip to content

Commit 023607c

Browse files
committed
[REFACTOR]: 기존의 menuId를 Int -> Long으로 수정
1 parent 6e194ae commit 023607c

5 files changed

Lines changed: 10 additions & 8 deletions

File tree

app/src/main/java/com/kuit/ourmenu/data/repository/MenuInfoRepository.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class MenuInfoRepository @Inject constructor(
1010
private val menuInfoService: MenuInfoService
1111
) {
1212
suspend fun getMenuInfo(
13-
menuId: Int
13+
menuId: Long
1414
) = runCatching {
1515
menuInfoService.getMenuInfo(menuId).handleBaseResponse().getOrThrow()
1616
}

app/src/main/java/com/kuit/ourmenu/data/service/MapService.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ interface MapService {
1818
@GET("api/users/menus/{mapId}/maps")
1919
suspend fun getMapDetail(
2020
@Path("mapId") mapId: Long
21-
): BaseResponse<List<MapDetailResponse>> // TODO: 리팩토링
21+
): BaseResponse<List<MapDetailResponse>>
2222

2323
@GET("api/users/menus/maps")
24-
suspend fun getMap(): BaseResponse<List<MapResponse>> // TODO: 리팩토링
24+
suspend fun getMap(): BaseResponse<List<MapResponse>>
2525

2626
@GET("api/users/menus/maps/{menuId}/search")
2727
suspend fun getMapMenuDetail(
2828
@Path("menuId") menuId: Long
29-
): BaseResponse<MapMenuDetailResponse> // TODO: 리팩토링
29+
): BaseResponse<MapMenuDetailResponse>
3030

3131
@GET("api/users/menus/maps/search")
3232
suspend fun getMapSearch(

app/src/main/java/com/kuit/ourmenu/data/service/MenuInfoService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ import retrofit2.http.Path
88
interface MenuInfoService {
99
@GET("api/menus/{menuId}")
1010
suspend fun getMenuInfo(
11-
@Path("menuId") menuId: Int
11+
@Path("menuId") menuId: Long
1212
): BaseResponse<MenuInfoResponse>
1313
}

app/src/main/java/com/kuit/ourmenu/ui/menuinfo/screen/MenuInfoMapScreen.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ fun MenuInfoMapScreen(navController: NavController) {
7878
mapX = 127.0,
7979
mapY = 37.0
8080
)
81-
)
81+
){
82+
83+
}
8284
},
8385
sheetPeekHeight = bottomSheetContentHeight,
8486
) { innerPaddings ->

app/src/main/java/com/kuit/ourmenu/ui/menuinfo/viewmodel/MenuInfoViewModel.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class MenuInfoViewModel @Inject constructor(
1717
private val _menuInfo = MutableStateFlow(MenuInfoResponse())
1818
val menuInfo = _menuInfo.asStateFlow()
1919

20-
private val _menuId = MutableStateFlow(0)
20+
private val _menuId = MutableStateFlow<Long>(0)
2121
val menuId = _menuId.asStateFlow()
2222

2323
private val _error: MutableStateFlow<String?> = MutableStateFlow(null)
@@ -27,7 +27,7 @@ class MenuInfoViewModel @Inject constructor(
2727
val isLoading = _isLoading.asStateFlow()
2828

2929
fun getMenuInfo(
30-
menuId: Int
30+
menuId: Long
3131
) {
3232
_menuId.value = menuId
3333

0 commit comments

Comments
 (0)