-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
120 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 22 additions & 2 deletions
24
ios/sidedishApp/sidedishApp/Domain/UseCase/DetailUseCase.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,28 @@ | ||
// | ||
// DetailUseCase.swift | ||
// sidedishApp | ||
// DetailApp | ||
// | ||
// Created by 김지선 on 2021/04/21. | ||
// Created by zombietux on 2021/04/20. | ||
// | ||
|
||
import Foundation | ||
import Combine | ||
|
||
class DetailUseCase: DetailUseCasePort { | ||
private var detailNetworkManager: DetailNetworkManagerProtocol | ||
|
||
init(detailNetworkManager: DetailNetworkManagerProtocol) { | ||
self.detailNetworkManager = detailNetworkManager | ||
} | ||
|
||
convenience init() { | ||
let detailNetworkManager = DetailNetworkManager() | ||
self.init(detailNetworkManager: detailNetworkManager) | ||
} | ||
|
||
func getItem(path category: String, path id: Int) -> AnyPublisher<Detail, Error> { | ||
return detailNetworkManager.getItem(path: category, path: id) | ||
} | ||
} | ||
|
||
|
9 changes: 7 additions & 2 deletions
9
ios/sidedishApp/sidedishApp/Domain/UseCase/DetailUseCasePort.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
// | ||
// DetailUseCasePort.swift | ||
// SidedishUseCasePort.swift | ||
// sidedishApp | ||
// | ||
// Created by 김지선 on 2021/04/21. | ||
// Created by zombietux on 2021/04/20. | ||
// | ||
|
||
import Foundation | ||
import Combine | ||
|
||
protocol DetailUseCasePort { | ||
func getItem(path category: String, path id: Int) -> AnyPublisher<Detail, Error> | ||
} |