change convenience return
This commit is contained in:
parent
0316828728
commit
7ccb191f6e
@ -50,13 +50,8 @@ public extension ClientParameterProtocol {
|
|||||||
return [clientParameterModel.type: "failed_to_collect"]
|
return [clientParameterModel.type: "failed_to_collect"]
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The handler should call this method to pass the parameter back to the caller.
|
/// Convenience function to format the return parameters consistently.
|
||||||
/// If using isFlatMap, you must provide at least 1 element in parameters or it will result in triggering a timeout.
|
func formatReturnParameters(_ parameter: AnyHashable) -> [String: AnyHashable] {
|
||||||
func returnParameters(_ isFlatMap: Bool, _ parameter: [String: AnyHashable], completionHandler: @escaping ([String: AnyHashable]?) -> ()) {
|
return [clientParameterModel.type: parameter]
|
||||||
if isFlatMap {
|
|
||||||
completionHandler(parameter)
|
|
||||||
} else {
|
|
||||||
completionHandler([clientParameterModel.type: parameter])
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user