From 4ec5990d8bdd86a9ee4305db624b75283003671d Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 8 Jun 2024 12:02:18 -0700 Subject: [PATCH] Check if suspended in a couple additional places. --- Feedbin/Sources/Feedbin/FeedbinAPICaller.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Feedbin/Sources/Feedbin/FeedbinAPICaller.swift b/Feedbin/Sources/Feedbin/FeedbinAPICaller.swift index f8c74f33a..56a274fee 100644 --- a/Feedbin/Sources/Feedbin/FeedbinAPICaller.swift +++ b/Feedbin/Sources/Feedbin/FeedbinAPICaller.swift @@ -78,6 +78,8 @@ public protocol FeedbinAPICallerDelegate: AnyObject { public func importOPML(opmlData: Data) async throws -> FeedbinImportResult { + if suspended { throw TransportError.suspended } + let callURL = feedbinBaseURL.appendingPathComponent("imports.json") var request = URLRequest(url: callURL, feedbinCredentials: credentials) request.addValue("text/xml; charset=utf-8", forHTTPHeaderField: HTTPRequestHeader.contentType) @@ -132,6 +134,8 @@ public protocol FeedbinAPICallerDelegate: AnyObject { public func retrieveSubscriptions() async throws -> [FeedbinSubscription]? { + if suspended { throw TransportError.suspended } + var callComponents = URLComponents(url: feedbinBaseURL.appendingPathComponent("subscriptions.json"), resolvingAgainstBaseURL: false)! callComponents.queryItems = [URLQueryItem(name: "mode", value: "extended")]