Skip to content

Commit 2104aea

Browse files
committed
[#50] Update PoliceStationUseCase.swift
1 parent 79d2666 commit 2104aea

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

GetHomeSafe/Problem Domain/UseCases/PoliceStationUseCase.swift

+9-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,13 @@ struct StubPoliceStationUseCase: PoliceStationUseCase {
1919
return Just(policeStations).eraseToAnyPublisher()
2020
}
2121
}
22-
typealias DefaultPoliceStationUseCase = StubPoliceStationUseCase
2322
#endif
23+
24+
typealias DefaultPoliceStationUseCase = SpringPoliceStationUseCase
25+
26+
struct SpringPoliceStationUseCase: PoliceStationUseCase {
27+
let repository: PoliceStationRepository
28+
func getPoliceStations(near currentLocation: Location) -> AnyPublisher<[PoliceStation], Never> {
29+
repository.getPoliceStationsNear(currentLocation: currentLocation)
30+
}
31+
}

0 commit comments

Comments
 (0)