aboutsummaryrefslogtreecommitdiff
path: root/src/actions/firebaseFirestore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/firebaseFirestore.js')
-rw-r--r--src/actions/firebaseFirestore.js12
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) => {