Skip to content

Commit

Permalink
fix after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
grdsdev committed Oct 15, 2024
1 parent 27f42d3 commit 0e8b43a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Sources/Auth/Internal/APIClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ struct APIClient: Sendable {
}
}

private func parseResponseAPIVersion(_ response: HTTPResponse) -> Date? {
private func parseResponseAPIVersion(_ response: Helpers.HTTPResponse) -> Date? {
guard let apiVersion = response.headers[.apiVersionHeaderName] else { return nil }

let formatter = ISO8601DateFormatter()
Expand Down
3 changes: 1 addition & 2 deletions Sources/Auth/Internal/Contants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ let autoRefreshTickDuration: TimeInterval = 30
let autoRefreshTickThreshold = 3

let defaultStorageKey = "supabase.auth.token"
let apiVersionHeaderName = "X-Supabase-Api-Version"

extension HTTPField.Name {
static let apiVersionHeaderName = HTTPField.Name(apiVersionHeaderName)!
static let apiVersionHeaderName = HTTPField.Name("X-Supabase-Api-Version")!
}

let apiVersions: [APIVersion.Name: APIVersion] = [
Expand Down
18 changes: 0 additions & 18 deletions Sources/Functions/FunctionsClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,6 @@ public final class FunctionsClient: Sendable {
mutableState.headers
}

init(
url: URL,
headers: [String: String],
region: String?,
http: any HTTPClientType
) {
self.url = url
self.region = region
self.http = http

mutableState.withValue {
$0.headers = HTTPHeaders(headers)
if $0.headers["X-Client-Info"] == nil {
$0.headers["X-Client-Info"] = "functions-swift/\(version)"
}
}
}

/// Initializes a new instance of `FunctionsClient`.
///
/// - Parameters:
Expand Down
9 changes: 9 additions & 0 deletions Supabase.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@
"version" : "1.3.3"
}
},
{
"identity" : "swift-http-types",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-http-types",
"state" : {
"revision" : "ae67c8178eb46944fd85e4dc6dd970e1f3ed6ccd",
"version" : "1.3.0"
}
},
{
"identity" : "swift-identified-collections",
"kind" : "remoteSourceControl",
Expand Down

0 comments on commit 0e8b43a

Please sign in to comment.