Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

Fix history sync issues

Andrew Bastinb357dc8e2f23
diff --git a/helpers/fb/history.ts b/helpers/fb/history.ts
index 318fdb97a..f806e18a5 100644
--- a/helpers/fb/history.ts
+++ b/helpers/fb/history.ts
@@ -86,6 +86,8 @@ async function toggleStar(entry: any, col: HistoryFBCollections) {
if (currentUser$.value == null)
throw new Error("User not logged in to toggle star")
+ console.log(entry)
+
try {
await firebase
.firestore()
@@ -93,7 +95,7 @@ async function toggleStar(entry: any, col: HistoryFBCollections) {
.doc(currentUser$.value.uid)
.collection(col)
.doc(entry.id)
- .update({ state: !entry.star })
+ .update({ star: !entry.star })
} catch (e) {
console.error("error toggling star", entry, e)
throw e