Created
August 21, 2016 19:34
-
-
Save mweststrate/b487ad8f3faaea9c7f30b9df2f00c853 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
@action performLogin(username, password, callback) { | |
this.fetch(`/json/${username}-${password}.json`) | |
.then(user => { | |
this.currentUser = user | |
callback(true) | |
}) | |
.catch(err => { | |
callback(false) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment