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

Commit

Permalink
change AuthTestClosure args to be string optionals instead
Browse files Browse the repository at this point in the history
  • Loading branch information
khakionion committed Feb 19, 2018
1 parent 228b628 commit 76a2bd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/WebAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public final class WebAPI {
public typealias HistoryClosure = (_ history: History) -> Void
public typealias FileClosure = (_ file: File) -> Void
public typealias ItemsClosure = (_ items: [Item]?) -> Void
public typealias AuthTestClosure = (_ user: String, _ team: String) -> Void
public typealias AuthTestClosure = (_ user: String?, _ team: String?) -> Void

public enum InfoType: String {
case purpose, topic
Expand Down Expand Up @@ -118,7 +118,7 @@ extension WebAPI {
extension WebAPI {
public func authenticationTest(success: AuthTestClosure?, failure: FailureClosure?) {
networkInterface.request(.authTest, parameters: ["token": token], successClosure: { (response) in
success?(response["user_id"] as! String, response["team_id"] as! String)
success?(response["user_id"] as? String, response["team_id"] as? String)
}) {(error) in
failure?(error)
}
Expand Down

0 comments on commit 76a2bd1

Please sign in to comment.