diff options
author | Michael Foiani <mfoiani2019@communityschoolnaples.org> | 2018-09-15 21:43:51 +0000 |
---|---|---|
committer | Michael Foiani <mfoiani2019@communityschoolnaples.org> | 2018-09-15 21:43:51 +0000 |
commit | 5afa931ec2d48ed6aefafcb122b63be435e734ed (patch) | |
tree | 6054754d879d12ad6ffa996ca7ee478ba877ae91 /src/actions/firebaseFirestore.js | |
parent | 0d6ea57b2b58111110f3a578b8ac7a14772d809b (diff) |
Revert "Created basic fix for new accounts to update username info when creatiing account."
This reverts commit 0d6ea57b2b58111110f3a578b8ac7a14772d809b
Diffstat (limited to 'src/actions/firebaseFirestore.js')
-rw-r--r-- | src/actions/firebaseFirestore.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/actions/firebaseFirestore.js b/src/actions/firebaseFirestore.js index 4234f4a..49e79c7 100644 --- a/src/actions/firebaseFirestore.js +++ b/src/actions/firebaseFirestore.js @@ -94,19 +94,15 @@ export const snapshotForums = () => (dispatch) => { //Do not dipatch to store, only update firebaseFirestore -export const setUserData = (_email, _password,_divison) => (dispatch, getState) => { +export const setUserData = (_divison) => (dispatch, getState) => { const uid = getState().firebaseAuth.uid; var docRef = firestore.collection('users').doc(uid); docRef.set({ hours: 0, - divison: _divison, - username: _email.replace('@communityschoolnaples.org', '') - }).then(() => { - dispatch(signIn(_email, _password)); - }) - .catch((error) => { + divison: _divison + }).catch((error) => { console.log(error); - }); + }) } export const requestHours = (_time, _trainee, _location, _subject, _date, _pictureName) => (dispatch, getState) => { |