Commit code with double quotes instead of single quotes

This commit is contained in:
Dmitry Yankowski
2020-02-24 21:06:23 -05:00
parent 3bd7c00038
commit 48100ead55
74 changed files with 3184 additions and 3184 deletions

View File

@@ -1,22 +1,22 @@
import firebase from 'firebase/app'
import 'firebase/firestore'
import 'firebase/auth'
import firebase from "firebase/app"
import "firebase/firestore"
import "firebase/auth"
// Initialize Firebase, copied from cloud console
const firebaseConfig = {
apiKey: 'AIzaSyCMsFreESs58-hRxTtiqQrIcimh4i1wbsM',
authDomain: 'postwoman-api.firebaseapp.com',
databaseURL: 'https://postwoman-api.firebaseio.com',
projectId: 'postwoman-api',
storageBucket: 'postwoman-api.appspot.com',
messagingSenderId: '421993993223',
appId: '1:421993993223:web:ec0baa8ee8c02ffa1fc6a2',
measurementId: 'G-ERJ6025CEB',
apiKey: "AIzaSyCMsFreESs58-hRxTtiqQrIcimh4i1wbsM",
authDomain: "postwoman-api.firebaseapp.com",
databaseURL: "https://postwoman-api.firebaseio.com",
projectId: "postwoman-api",
storageBucket: "postwoman-api.appspot.com",
messagingSenderId: "421993993223",
appId: "1:421993993223:web:ec0baa8ee8c02ffa1fc6a2",
measurementId: "G-ERJ6025CEB",
}
firebase.initializeApp(firebaseConfig)
// a reference to the users collection
const usersCollection = firebase.firestore().collection('users')
const usersCollection = firebase.firestore().collection("users")
// the shared state object that any vue component
// can get access to
@@ -38,17 +38,17 @@ export const fb = {
}
usersCollection
.doc(fb.currentUser.uid)
.collection('feeds')
.collection("feeds")
.add(dt)
.catch(e => console.error('error inserting', dt, e))
.catch(e => console.error("error inserting", dt, e))
},
deleteFeed: id => {
usersCollection
.doc(fb.currentUser.uid)
.collection('feeds')
.collection("feeds")
.doc(id)
.delete()
.catch(e => console.error('error deleting', id, e))
.catch(e => console.error("error deleting", id, e))
},
writeSettings: async (setting, value) => {
const st = {
@@ -61,31 +61,31 @@ export const fb = {
}
usersCollection
.doc(fb.currentUser.uid)
.collection('settings')
.collection("settings")
.doc(setting)
.set(st)
.catch(e => console.error('error updating', st, e))
.catch(e => console.error("error updating", st, e))
},
writeHistory: async entry => {
const hs = entry
usersCollection
.doc(fb.currentUser.uid)
.collection('history')
.collection("history")
.add(hs)
.catch(e => console.error('error inserting', hs, e))
.catch(e => console.error("error inserting", hs, e))
},
deleteHistory: entry => {
usersCollection
.doc(fb.currentUser.uid)
.collection('history')
.collection("history")
.doc(entry.id)
.delete()
.catch(e => console.error('error deleting', entry, e))
.catch(e => console.error("error deleting", entry, e))
},
clearHistory: () => {
usersCollection
.doc(fb.currentUser.uid)
.collection('history')
.collection("history")
.get()
.then(({ docs }) => {
docs.forEach(e => fb.deleteHistory(e))
@@ -94,10 +94,10 @@ export const fb = {
toggleStar: (entry, value) => {
usersCollection
.doc(fb.currentUser.uid)
.collection('history')
.collection("history")
.doc(entry.id)
.update({ star: value })
.catch(e => console.error('error deleting', entry, e))
.catch(e => console.error("error deleting", entry, e))
},
writeCollections: async collection => {
const cl = {
@@ -109,10 +109,10 @@ export const fb = {
}
usersCollection
.doc(fb.currentUser.uid)
.collection('collections')
.doc('sync')
.collection("collections")
.doc("sync")
.set(cl)
.catch(e => console.error('error updating', cl, e))
.catch(e => console.error("error updating", cl, e))
},
writeEnvironments: async environment => {
const ev = {
@@ -124,10 +124,10 @@ export const fb = {
}
usersCollection
.doc(fb.currentUser.uid)
.collection('environments')
.doc('sync')
.collection("environments")
.doc("sync")
.set(ev)
.catch(e => console.error('error updating', ev, e))
.catch(e => console.error("error updating", ev, e))
},
}
@@ -147,13 +147,13 @@ firebase.auth().onAuthStateChanged(user => {
usersCollection
.doc(fb.currentUser.uid)
.set(us)
.catch(e => console.error('error updating', us, e))
.catch(e => console.error("error updating", us, e))
})
usersCollection
.doc(fb.currentUser.uid)
.collection('feeds')
.orderBy('createdOn', 'desc')
.collection("feeds")
.orderBy("createdOn", "desc")
.onSnapshot(feedsRef => {
const feeds = []
feedsRef.forEach(doc => {
@@ -166,7 +166,7 @@ firebase.auth().onAuthStateChanged(user => {
usersCollection
.doc(fb.currentUser.uid)
.collection('settings')
.collection("settings")
.onSnapshot(settingsRef => {
const settings = []
settingsRef.forEach(doc => {
@@ -179,7 +179,7 @@ firebase.auth().onAuthStateChanged(user => {
usersCollection
.doc(fb.currentUser.uid)
.collection('history')
.collection("history")
.onSnapshot(historyRef => {
const history = []
historyRef.forEach(doc => {
@@ -192,7 +192,7 @@ firebase.auth().onAuthStateChanged(user => {
usersCollection
.doc(fb.currentUser.uid)
.collection('collections')
.collection("collections")
.onSnapshot(collectionsRef => {
const collections = []
collectionsRef.forEach(doc => {
@@ -205,7 +205,7 @@ firebase.auth().onAuthStateChanged(user => {
usersCollection
.doc(fb.currentUser.uid)
.collection('environments')
.collection("environments")
.onSnapshot(environmentsRef => {
const environments = []
environmentsRef.forEach(doc => {