Skip to content

Commit

Permalink
[Fix] #386 - 콕찌르기 ALL_USER 타입 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
dlwogus0128 committed Sep 25, 2024
1 parent ddd79f0 commit 894323a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extension DailySoptuneRepository: DailySoptuneRepositoyInterface {
}

public func getRandomUser() -> AnyPublisher<[Domain.PokeRandomUserInfoModel], any Error> {
pokeService.getRandomUsers(randomType: "ALL_USER", size: 1)
pokeService.getRandomUsers(randomType: nil, size: 1)
.map { $0.randomInfoList.map { $0.toDomain() }}
.eraseToAnyPublisher()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ extension PokeRandomUserEntityType {
case .mbti: return .mbti
case .sojuCapacity: return .sojuCapacity
case .university: return .university
case .allUser: return .allUser
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,14 @@ extension AppDelegate {
)
}
)
container.register(
interface: DailySoptuneRepositoyInterface.self,
implement: {
DailySoptuneRepository(
fortuneService: DefaultFortuneService(),
pokeService: DefaultPokeService()
)
}
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public enum PokeRandomUserType: String {
case mbti = "MBTI"
case sojuCapacity = "SOJU_CAPACITY"
case university = "UNIVERSITY"
case allUser = "ALL_USER"
}

public enum PokeRandomUserQueryCount {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ public enum PokeRandomUserEntityType: String, Decodable {
case mbti = "MBTI"
case sojuCapacity = "SOJU_CAPACITY"
case university = "UNIVERSITY"
case allUser = "ALL_USER"
}

0 comments on commit 894323a

Please sign in to comment.