File tree Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -126,23 +126,24 @@ public extension SearchClient {
126
126
try await self . getApiKey ( key: key, requestOptions: requestOptions)
127
127
} ,
128
128
validate: { response in
129
- if apiKey. description != nil && apiKey. description != response. description {
129
+ if apiKey. description != nil , apiKey. description != response. description {
130
130
return false
131
131
}
132
132
133
- if apiKey. queryParameters != nil && apiKey. queryParameters != response. queryParameters {
133
+ if apiKey. queryParameters != nil , apiKey. queryParameters != response. queryParameters {
134
134
return false
135
135
}
136
136
137
- if apiKey. maxHitsPerQuery != nil && apiKey. maxHitsPerQuery != response. maxHitsPerQuery {
137
+ if apiKey. maxHitsPerQuery != nil , apiKey. maxHitsPerQuery != response. maxHitsPerQuery {
138
138
return false
139
139
}
140
140
141
- if apiKey. maxQueriesPerIPPerHour != nil && apiKey. maxQueriesPerIPPerHour != response. maxQueriesPerIPPerHour {
141
+ if apiKey. maxQueriesPerIPPerHour != nil ,
142
+ apiKey. maxQueriesPerIPPerHour != response. maxQueriesPerIPPerHour {
142
143
return false
143
144
}
144
145
145
- if apiKey. validity != nil && apiKey. validity != response. validity {
146
+ if apiKey. validity != nil , apiKey. validity != response. validity {
146
147
return false
147
148
}
148
149
@@ -191,11 +192,11 @@ public extension SearchClient {
191
192
execute: { _ in
192
193
do {
193
194
return try await self . getApiKey ( key: key, requestOptions: requestOptions)
194
- } catch AlgoliaError . httpError( let error) {
195
+ } catch let AlgoliaError . httpError( error) {
195
196
if error. statusCode == 404 {
196
197
return nil
197
198
}
198
-
199
+
199
200
throw error
200
201
}
201
202
} ,
Original file line number Diff line number Diff line change @@ -76,14 +76,5 @@ let package = Package(
76
76
. target( name: " Utils " ) ,
77
77
] + libraries
78
78
) ,
79
- . testTarget(
80
- name: " handwritten " ,
81
- dependencies: [
82
- . product( name: " DotEnv " , package : " DotEnv " ) ,
83
- . target( name: " Utils " ) ,
84
- . product( name: " Core " , package : " algoliasearch-client-swift " ) ,
85
- . product( name: " Search " , package : " algoliasearch-client-swift " ) ,
86
- ]
87
- ) ,
88
79
]
89
80
)
You can’t perform that action at this time.
0 commit comments