Feedly API is no longer returning the feed values for deleted feeds, so make the response (which we ignore anyway), optional. Fixes #2897

This commit is contained in:
Kiel Gillard 🤪 2021-03-23 17:00:54 +11:00 committed by Maurice Parker
parent 9dc9db597a
commit 7e791a2e7d
1 changed files with 3 additions and 1 deletions

View File

@ -369,7 +369,9 @@ final class FeedlyAPICaller {
}
}
send(request: request, resultType: [FeedlyFeed].self, dateDecoding: .millisecondsSince1970, keyDecoding: .convertFromSnakeCase) { result in
// `resultType` is optional because the Feedly API has gone from returning an array of removed feeds to returning `null`.
// https://developer.feedly.com/v3/collections/#remove-multiple-feeds-from-a-personal-collection
send(request: request, resultType: Optional<[FeedlyFeed]>.self, dateDecoding: .millisecondsSince1970, keyDecoding: .convertFromSnakeCase) { result in
switch result {
case .success((let httpResponse, _)):
if httpResponse.statusCode == 200 {