Last active
September 22, 2019 15:48
-
-
Save SwiftyAlex/c469436388298a1aafab3f55acde5ca8 to your computer and use it in GitHub Desktop.
Todo Service
This file contains hidden or 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
import Foundation | |
import Combine | |
public class TodoService { | |
public func getTodo(todo: Todo) -> AnyPublisher<Todo, Error> { | |
return Router.performRequest(GetTodoRoute(todo: todo)) | |
.receive(on: DispatchQueue.main) | |
.eraseToAnyPublisher() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment