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

Refactor GetNotificationsReport.live func into let

parent b63f86c4
No related branches found
No related tags found
2 merge requests!138Notifications,!102Release 1.0.0
...@@ -14,23 +14,22 @@ public struct GetNotificationsReport { ...@@ -14,23 +14,22 @@ public struct GetNotificationsReport {
} }
extension GetNotificationsReport { extension GetNotificationsReport {
public static func live() -> GetNotificationsReport { public static let live = GetNotificationsReport {
GetNotificationsReport { e2eId, notificationCSV, services in e2eId, notificationCSV, services in
var error: NSError? var error: NSError?
let result = BindingsGetNotificationsReport( let result = BindingsGetNotificationsReport(
e2eId, e2eId,
notificationCSV, notificationCSV,
try services.encode(), try services.encode(),
&error &error
) )
if let error = error { if let error = error {
throw error throw error
}
guard let result = result else {
fatalError("BindingsGetNotificationsReport returned nil without providing error")
}
return try NotificationReport.decode(result)
} }
guard let result = result else {
fatalError("BindingsGetNotificationsReport returned nil without providing error")
}
return try NotificationReport.decode(result)
} }
} }
......
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