diff options
Diffstat (limited to 'src/actions/firebaseAuth.js')
-rw-r--r-- | src/actions/firebaseAuth.js | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/actions/firebaseAuth.js b/src/actions/firebaseAuth.js index 720a172..ff49888 100644 --- a/src/actions/firebaseAuth.js +++ b/src/actions/firebaseAuth.js @@ -79,42 +79,3 @@ export const signOut = () => (dispatch) => { dispatch(authSignOut()); }); } - -//other - -export const setUserData = (_divison) => (dispatch, getState) => { - const uid = getState().firebase.uid; - var docRef = firestore.collection('users').doc(uid); - docRef.set({ - hours: 0, - divison: _divison - }).catch((error) => { - console.log(error); - }) -} - -export const adminListener = () => (dispatch, getState) => { - document.onkeyup = function(e) { - if(e.altKey && e.which == 65) { - var docRef = firestore.collection('keys').doc('adminKey'); - docRef.get().then((doc) => { - if(prompt('Enter admin password') == doc.data().password) { - dispatch(adminControls()); - } - }); - } - } -} - -export const adminControls = () => (dispatch) => { - dispatch(updateAdmin()); - dispatch(snapshotAdminRequests()); - dispatch(snapshotAdminCompList()); -} - -export const updateAdmin = () => { - return { - type: UPDATE_ADMIN, - payload: true - } -} |