Created
February 24, 2015 15:46
-
-
Save swennemans/acb075497535d3371c23 to your computer and use it in GitHub Desktop.
Actions
This file contains hidden or 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
import Reflux from 'reflux'; | |
import Firebase from 'firebase'; | |
import fireAuth from '../lib/firebaseAuth.js' | |
var sessionActions = Reflux.createActions([ | |
'login', | |
'register', | |
'registerSuccess', | |
'registerFail' | |
]); | |
sessionActions.register.listen(function (email, password) { | |
fireAuth.register(email, password) | |
.then(function (data) { | |
console.log('Data is', data) | |
sessionActions.registerSuccess; | |
}) | |
.catch(function (err) { | |
console.log('Err is', err) | |
sessionActions.registerFail | |
}); | |
}); | |
module.exports |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment