From 4a083fe73bc83ea61b1a9d1e7840d671a4824399 Mon Sep 17 00:00:00 2001 From: Benjamin Toby Date: Sun, 1 Jun 2025 16:13:56 +0100 Subject: [PATCH] Updates --- .../functions/api/social-login/handleSocialDb.js | 13 ++++++++----- .../functions/api/social-login/handleSocialDb.ts | 13 ++++++++----- package.json | 2 +- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/dist/package-shared/functions/api/social-login/handleSocialDb.js b/dist/package-shared/functions/api/social-login/handleSocialDb.js index 278d289..3b93e62 100644 --- a/dist/package-shared/functions/api/social-login/handleSocialDb.js +++ b/dist/package-shared/functions/api/social-login/handleSocialDb.js @@ -87,11 +87,14 @@ function handleSocialDb(_a) { console.log("handleSocialDb:existingEmailOnly", existingEmailOnly); } if (existingEmailOnly === null || existingEmailOnly === void 0 ? void 0 : existingEmailOnly[0]) { - return { - success: false, - payload: null, - msg: "This Email is already taken", - }; + return yield (0, loginSocialUser_1.default)({ + user: existingEmailOnly[0], + social_platform, + invitation, + database: finalDbName, + additionalFields, + debug, + }); } else if (loginOnly) { return { diff --git a/package-shared/functions/api/social-login/handleSocialDb.ts b/package-shared/functions/api/social-login/handleSocialDb.ts index 72aea1e..44fc0fd 100644 --- a/package-shared/functions/api/social-login/handleSocialDb.ts +++ b/package-shared/functions/api/social-login/handleSocialDb.ts @@ -108,11 +108,14 @@ export default async function handleSocialDb({ } if (existingEmailOnly?.[0]) { - return { - success: false, - payload: null, - msg: "This Email is already taken", - }; + return await loginSocialUser({ + user: existingEmailOnly[0], + social_platform, + invitation, + database: finalDbName, + additionalFields, + debug, + }); } else if (loginOnly) { return { success: false, diff --git a/package.json b/package.json index 33c4248..686cbeb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@moduletrace/datasquirel", - "version": "4.6.9", + "version": "4.7.0", "description": "Cloud-based SQL data management tool", "main": "dist/index.js", "bin": {