Skip to content

Commit

Permalink
Solve the CI build error
Browse files Browse the repository at this point in the history
  • Loading branch information
nabilBouzineDev committed Oct 23, 2024
1 parent c5e4a17 commit 5e4310c
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,18 @@ class FakeFavoriteDAO : FavoriteDAO {
override fun getAllFavoriteAirports(): Flow<List<Favorite>> = flow {
emit(favoriteAirports)
}

override fun getFavoriteByDepartureCodeAndDestinationCode(
departureCode: String,
destinationCode: String
): Flow<Favorite> = flow {

val favorite =
favoriteAirports.filter {
it.departureCode == departureCode
&& it.destinationCode == destinationCode
}

emit(favorite[0])
}
}

0 comments on commit 5e4310c

Please sign in to comment.