import firebase from 'firebase/app';
import 'firebase/firestore';
export const mergeToken = async (token) => {
  if (!token) {
    return;
  }
  const firestore = firebase.firestore();
  token.data.updated_at = firebase.firestore.Timestamp.now();
  await firestore.collection('tokens').doc(token.id).set(token.data, { merge: true });
};
