Skip to content

Commit 313e466

Browse files
committed
refactor : SubwayTrainNowLocationResponse의 프로퍼티 이름 변경
1 parent b5d0d22 commit 313e466

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

data/src/main/java/com/stop/data/remote/model/nowlocation/subway/SubwayTrainNowLocationResponse.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
package com.stop.data.remote.model.nowlocation.subway
22

3-
import android.util.Log
3+
import com.squareup.moshi.Json
44
import com.squareup.moshi.JsonClass
55
import com.stop.data.model.nowlocation.SubwayTrainRealTimePositionRepositoryItem
66

77
@JsonClass(generateAdapter = true)
88
data class SubwayTrainNowLocationResponse(
9-
val realtimePositionList: List<TrainLocationInfo>
9+
@Json(name = "realtimePositionList")
10+
val realtimePositions: List<TrainLocationInfo>
1011
) {
1112
fun toRepositoryModel(trainNumber: String): SubwayTrainRealTimePositionRepositoryItem {
12-
Log.d("MissionFragment","mission ${realtimePositionList.first { it.trainNumber == trainNumber }}")
13-
14-
return realtimePositionList.first { it.trainNumber == trainNumber }.run {
13+
return realtimePositions.first { it.trainNumber == trainNumber }.run {
1514
SubwayTrainRealTimePositionRepositoryItem(
1615
subwayId = subwayId,
1716
subwayName = stationName,

0 commit comments

Comments
 (0)