Skip to content
This repository was archived by the owner on Jan 28, 2019. It is now read-only.

Commit 76a2bd1

Browse files
author
Michael Herring
committed
change AuthTestClosure args to be string optionals instead
1 parent 228b628 commit 76a2bd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/WebAPI.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public final class WebAPI {
3535
public typealias HistoryClosure = (_ history: History) -> Void
3636
public typealias FileClosure = (_ file: File) -> Void
3737
public typealias ItemsClosure = (_ items: [Item]?) -> Void
38-
public typealias AuthTestClosure = (_ user: String, _ team: String) -> Void
38+
public typealias AuthTestClosure = (_ user: String?, _ team: String?) -> Void
3939

4040
public enum InfoType: String {
4141
case purpose, topic
@@ -118,7 +118,7 @@ extension WebAPI {
118118
extension WebAPI {
119119
public func authenticationTest(success: AuthTestClosure?, failure: FailureClosure?) {
120120
networkInterface.request(.authTest, parameters: ["token": token], successClosure: { (response) in
121-
success?(response["user_id"] as! String, response["team_id"] as! String)
121+
success?(response["user_id"] as? String, response["team_id"] as? String)
122122
}) {(error) in
123123
failure?(error)
124124
}

0 commit comments

Comments
 (0)