Skip to content
Snippets Groups Projects
Commit 9d944782 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Update GroupGetMembership function wrapper

parent bd9505a1
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!49Update Bindings
......@@ -2,9 +2,9 @@ import Bindings
import XCTestDynamicOverlay
public struct GroupGetMembership {
public var run: () throws -> Data
public var run: () throws -> [GroupMember]
public func callAsFunction() throws -> Data {
public func callAsFunction() throws -> [GroupMember] {
try run()
}
}
......@@ -12,7 +12,8 @@ public struct GroupGetMembership {
extension GroupGetMembership {
public static func live(_ bindingsGroup: BindingsGroup) -> GroupGetMembership {
GroupGetMembership {
try bindingsGroup.getMembership()
let data = try bindingsGroup.getMembership()
return try [GroupMember].decode(data)
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment