Fix compilation issue
This commit is contained in:
parent
21246e2ebf
commit
192bff196b
1 changed files with 8 additions and 3 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue