From ce2f58c7266ce8daa518e454d88a85aa0d4a3e50 Mon Sep 17 00:00:00 2001 From: Enes Date: Fri, 19 Jul 2024 02:33:51 +0300 Subject: [PATCH] BUG Fixes --- CHANGELOG.md | 2 +- app/package.json | 2 +- app/src/Apps/wix_members.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06c340fb..dd51360b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ In this file you can find what's changed in each version. (Versions with -dev, - --- -### 4.5.1 +### 4.5.1, 4.5.2 - BUG Fixes and TS type fixes. For Wix Members sync plug-in. diff --git a/app/package.json b/app/package.json index cdc77cf1..12372fb3 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "@exweiv/weiv-data", - "version": "4.5.1", + "version": "4.5.2", "description": "Custom API Library for Wix sites to connect MongoDB. Designed to easily switch from wix-data APIs.", "main": "./lib/index.js", "files": [ diff --git a/app/src/Apps/wix_members.ts b/app/src/Apps/wix_members.ts index 78a46f90..6e4490a3 100644 --- a/app/src/Apps/wix_members.ts +++ b/app/src/Apps/wix_members.ts @@ -61,9 +61,9 @@ export async function onMemberUpdated(event: Document): Promise { // Insert to MongoDB (fire and forget) Promise.all([ - (await native(`${syncDatabase}/WixMembersPublicData`, true)).updateOne(find, readyPublicData, { retryWrites: true }), - (await native(`${syncDatabase}/WixMembersPrivateData`, true)).updateOne(find, readyPrivateData, { retryWrites: true }), - (await native(`${syncDatabase}/WixMembersFullData`, true)).updateOne(find, readyFullData, { retryWrites: true }), + (await native(`${syncDatabase}/WixMembersPublicData`, true)).updateOne(find, { $set: readyPublicData }, { retryWrites: true }), + (await native(`${syncDatabase}/WixMembersPrivateData`, true)).updateOne(find, { $set: readyPrivateData }, { retryWrites: true }), + (await native(`${syncDatabase}/WixMembersFullData`, true)).updateOne(find, { $set: readyFullData }, { retryWrites: true }), ]); } catch (err) { // Log Error (fire and forget)