Fix update preferences not being tracked
This commit is contained in:
@@ -38,7 +38,11 @@ onMounted(() => {
|
|||||||
|
|
||||||
const saveOp = watchPausable(
|
const saveOp = watchPausable(
|
||||||
preferences,
|
preferences,
|
||||||
async () => {
|
async (newData) => {
|
||||||
|
trackEvent("update_preferences", {
|
||||||
|
...newData,
|
||||||
|
});
|
||||||
|
|
||||||
await $fetch("/api/preferences", {
|
await $fetch("/api/preferences", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
body: toValue(preferences),
|
body: toValue(preferences),
|
||||||
@@ -47,13 +51,6 @@ const saveOp = watchPausable(
|
|||||||
{
|
{
|
||||||
initialState: "paused",
|
initialState: "paused",
|
||||||
deep: true,
|
deep: true,
|
||||||
onTrigger: (event) => {
|
|
||||||
trackEvent("update_preferences", {
|
|
||||||
key: event.key,
|
|
||||||
value: event.newValue,
|
|
||||||
oldValue: event.oldValue,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user