From 6cf24127bac51954a1705cb015e45502143072a4 Mon Sep 17 00:00:00 2001 From: David Code Howard Date: Fri, 13 Oct 2023 11:21:42 -0400 Subject: [PATCH] fix: Use case-insensitive match for user existence email query --- package-lock.json | 4 ++-- package.json | 2 +- src/account/accountService.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 984b8abe..a23e02e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "lodash": "^4.17.21", "react": "^18.2.0", "react-redux": "^8.1.2", - "terraso-backend": "github:techmatters/terraso-backend#4929e5f", + "terraso-backend": "github:techmatters/terraso-backend#b619a7d", "uuid": "^9.0.1" }, "devDependencies": { @@ -13101,7 +13101,7 @@ }, "node_modules/terraso-backend": { "version": "0.1.0", - "resolved": "git+ssh://git@github.com/techmatters/terraso-backend.git#4929e5f4599cebc2f107873dd0075885c4df5e46" + "resolved": "git+ssh://git@github.com/techmatters/terraso-backend.git#b619a7dd784beb6ad21b8d4b1ea17b2b773bb26e" }, "node_modules/test-exclude": { "version": "6.0.0", diff --git a/package.json b/package.json index b5f2c840..1ca2e855 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "lodash": "^4.17.21", "react": "^18.2.0", "react-redux": "^8.1.2", - "terraso-backend": "github:techmatters/terraso-backend#4929e5f", + "terraso-backend": "github:techmatters/terraso-backend#b619a7d", "uuid": "^9.0.1" }, "scripts": { diff --git a/src/account/accountService.ts b/src/account/accountService.ts index cf5d5066..147c9b50 100644 --- a/src/account/accountService.ts +++ b/src/account/accountService.ts @@ -165,14 +165,14 @@ export const checkUserInProject = async ( ) => { const existQuery = graphql(` query userExistsInProject($email: String!, $project: String!) { - userExists: users(email: $email) { + userExists: users(email_Iexact: $email) { edges { node { ...userFields } } } - userInProject: users(project: $project, email: $email) { + userInProject: users(project: $project, email_Iexact: $email) { totalCount } }