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"]
|
||||
}
|
||||
|
||||
/// The handler should call this method to pass the parameter back to the caller.
|
||||
/// If using isFlatMap, you must provide at least 1 element in parameters or it will result in triggering a timeout.
|
||||
func returnParameters(_ isFlatMap: Bool, _ parameter: [String: AnyHashable], completionHandler: @escaping ([String: AnyHashable]?) -> ()) {
|
||||
if isFlatMap {
|
||||
completionHandler(parameter)
|
||||
} else {
|
||||
completionHandler([clientParameterModel.type: parameter])
|
||||
}
|
||||
/// Convenience function to format the return parameters consistently.
|
||||
func formatReturnParameters(_ parameter: AnyHashable) -> [String: AnyHashable] {
|
||||
return [clientParameterModel.type: parameter]
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user