Fix compilation issue

This commit is contained in:
William Brawner 2021-12-23 21:05:47 -07:00
parent 21246e2ebf
commit 192bff196b

View file

@ -307,7 +307,10 @@ class RequestHelper {
func delete(_ endPoint: String) async throws { func delete(_ endPoint: String) async throws {
// Delete requests return no body so they need a special request helper // Delete requests return no body so they need a special request helper
guard let url = URL(string: self.baseUrl + endPoint) else { guard let baseUrl = self.baseUrl else {
throw NetworkError.invalidUrl
}
guard let url = URL(string: baseUrl + endPoint) else {
throw NetworkError.invalidUrl throw NetworkError.invalidUrl
} }
@ -331,8 +334,10 @@ class RequestHelper {
method: String, method: String,
data: Encodable? = nil data: Encodable? = nil
) async throws -> ResultType { ) async throws -> ResultType {
guard let url = URL(string: self.baseUrl + endPoint) else { guard let baseUrl = self.baseUrl else {
print("Unable to build url from base: \(self.baseUrl)") throw NetworkError.invalidUrl
}
guard let url = URL(string: baseUrl + endPoint) else {
throw NetworkError.invalidUrl throw NetworkError.invalidUrl
} }