Created
June 16, 2015 05:34
-
-
Save cwagdev/89b1715b20b29f8959ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func loginUserWithUsername(username: String, password: String) throws -> String { | |
guard username.characters.count != 0 else { | |
throw LoginError.EmptyUsername | |
} | |
guard password.characters.count != 0 else { | |
throw LoginError.EmptyPassword | |
} | |
///Handle all the other, | |
return "token:" + username | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment