SHARE
TWEET

Untitled

a guest Oct 8th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { db } from '../../firebase';
  2.  
  3. export function getLogbookData({ commit }) {
  4.   db.collection('logbook').get().then((querySnapshot) => {
  5.     const tempData = [];
  6.     querySnapshot.forEach((doc) => {
  7.       const data = {
  8.         id: doc.id,
  9.         cardUid: doc.data().uid,
  10.         timestamp: doc.data().timestamp,
  11.       };
  12.       tempData.push(data);
  13.     });
  14.     commit('setLogbookData', tempData);
  15.   });
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top