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

Refactor UserDiscoveryPermanentDeleteAccount

parent 8fa17463
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!42Update Bindings
......@@ -4,15 +4,15 @@ import XCTestDynamicOverlay
public struct UserDiscoveryPermanentDeleteAccount {
public var run: (Fact) throws -> Void
public func callAsFunction(_ fact: Fact) throws {
try run(fact)
public func callAsFunction(username: Fact) throws {
try run(username)
}
}
extension UserDiscoveryPermanentDeleteAccount {
public static func live(_ bindingsUD: BindingsUserDiscovery) -> UserDiscoveryPermanentDeleteAccount {
UserDiscoveryPermanentDeleteAccount { fact in
try bindingsUD.permanentDeleteAccount(fact.encode())
UserDiscoveryPermanentDeleteAccount { username in
try bindingsUD.permanentDeleteAccount(username.encode())
}
}
}
......
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