Feedly API is no longer returning the collection/folder values for deleted collections/folders so make the response (which we ignore anyway), optional. Fixes #3015

This commit is contained in:
Kiel Gillard 🤪 2021-04-18 20:10:01 +10:00
parent 8307a64b7b
commit ba579bcc57
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ final class FeedlyAPICaller {
request.addValue("application/json", forHTTPHeaderField: "Accept-Type") request.addValue("application/json", forHTTPHeaderField: "Accept-Type")
request.addValue("OAuth \(accessToken)", forHTTPHeaderField: HTTPRequestHeader.authorization) request.addValue("OAuth \(accessToken)", forHTTPHeaderField: HTTPRequestHeader.authorization)
send(request: request, resultType: String.self, dateDecoding: .millisecondsSince1970, keyDecoding: .convertFromSnakeCase) { result in send(request: request, resultType: Optional<FeedlyCollection>.self, dateDecoding: .millisecondsSince1970, keyDecoding: .convertFromSnakeCase) { result in
switch result { switch result {
case .success(let (httpResponse, _)): case .success(let (httpResponse, _)):
if httpResponse.statusCode == 200 { if httpResponse.statusCode == 200 {