Skip to content

Commit

Permalink
chore: remove commented codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammed Rokon Uddin committed Feb 9, 2024
1 parent b69a454 commit ca76092
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
22 changes: 0 additions & 22 deletions {{cookiecutter.app_name}}/Common/Sources/Common/BaseAction.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -57,30 +57,6 @@ extension NetworkingType {
}
}
}

// func requestObject<Element: Codable>(_ target: T, type: Element.Type) -> AnyPublisher<Element, NetworkingError> {
// return provider.request(target)
// .filterSuccessfulStatusCodes()
// .map(Element.self)
// .mapError { NetworkingError.error($0.localizedDescription) }
// // TODO: fetch from cache
// .tryCatch { _ in self.coreDataManager.localRandom() }
// .mapError { NetworkingError.error($0.localizedDescription) }
// .eraseToAnyPublisher()
// }

func requestArray<Element: Codable>(_ target: T, type _: Element.Type)
-> AnyPublisher<[Element], NetworkingError>
{
provider.request(target)
.filterSuccessfulStatusCodes()
.map([Element].self)
.mapError { NetworkingError.error($0.localizedDescription) }
// TODO: fetch from cache
// .tryCatch { _ in self.coreDataManager.localRandom() }
.mapError { NetworkingError.error($0.localizedDescription) }
.eraseToAnyPublisher()
}
}

// MARK: - Provider support
Expand Down

0 comments on commit ca76092

Please sign in to comment.