Fix history sync issues
This commit is contained in:
@@ -86,6 +86,8 @@ async function toggleStar(entry: any, col: HistoryFBCollections) {
|
|||||||
if (currentUser$.value == null)
|
if (currentUser$.value == null)
|
||||||
throw new Error("User not logged in to toggle star")
|
throw new Error("User not logged in to toggle star")
|
||||||
|
|
||||||
|
console.log(entry)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await firebase
|
await firebase
|
||||||
.firestore()
|
.firestore()
|
||||||
@@ -93,7 +95,7 @@ async function toggleStar(entry: any, col: HistoryFBCollections) {
|
|||||||
.doc(currentUser$.value.uid)
|
.doc(currentUser$.value.uid)
|
||||||
.collection(col)
|
.collection(col)
|
||||||
.doc(entry.id)
|
.doc(entry.id)
|
||||||
.update({ state: !entry.star })
|
.update({ star: !entry.star })
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("error toggling star", entry, e)
|
console.error("error toggling star", entry, e)
|
||||||
throw e
|
throw e
|
||||||
|
|||||||
Reference in New Issue
Block a user