Digital PCT265 story MVAPCT-323: Begin working out how to make legacy fallbackResponse work.

This commit is contained in:
Hedden, Kyle Matthew 2024-10-15 18:52:34 -04:00
parent 3e1581e28e
commit 5e65a0c9f1

View File

@ -36,7 +36,7 @@ open class ActionOpenPageHandler: MVMCoreJSONActionHandlerProtocol {
}
if operation.error != nil, let fallbackResponseJson = model.fallbackResponse?.toJSON() {
await runFallback(response: fallbackResponseJson, requestParameters: requestParameters, delegateObject: delegateObject, additionalData: additionalData)
await Self.runFallback(response: fallbackResponseJson, requestParameters: requestParameters, delegateObject: delegateObject, additionalData: additionalData)
}
}
} catch {
@ -45,7 +45,7 @@ open class ActionOpenPageHandler: MVMCoreJSONActionHandlerProtocol {
}
/// Given backup JSON data, run it through the load handler.
fileprivate func runFallback(response: JSONDictionary, requestParameters: MVMCoreRequestParameters, delegateObject: DelegateObject?, additionalData: [AnyHashable : Any]?) async {
public static func runFallback(response: JSONDictionary, requestParameters: MVMCoreRequestParameters, delegateObject: DelegateObject?, additionalData: [AnyHashable : Any]?) async {
guard let loadHandler = MVMCoreLoadHandler.sharedGlobal(), let fallbackLoadObject = MVMCoreLoadObject(requestParameters: requestParameters, dataForPage: additionalData, delegateObject: delegateObject)
else { return }