From e962e03dede29cb31b7573c9f3d8a507fcce8593 Mon Sep 17 00:00:00 2001 From: Joabesv Date: Fri, 17 Nov 2023 01:52:06 -0300 Subject: [PATCH] fix user search --- app/api/facebook/func.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/api/facebook/func.js b/app/api/facebook/func.js index 344f756..4bb81b0 100644 --- a/app/api/facebook/func.js +++ b/app/api/facebook/func.js @@ -3,9 +3,8 @@ const app = require('@/app') module.exports = async (context) => { const { ra, email } = context.body - - const user = await app.models.users.findOne({ ra, email }) - + const user = await app.models.users.findOne({ ra, 'oauth.emailFacebook': email }) + if (!user) { return { error: user,