From 4a822008fd0888a4be2a584f025d3ac3c60b6e71 Mon Sep 17 00:00:00 2001 From: David Code Howard Date: Fri, 6 Oct 2023 15:00:09 -0400 Subject: [PATCH] feat: Case-less matching for user email --- 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 7f9962acb..ec3f8f039 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#4e5efa8", "uuid": "^9.0.0" }, "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#4e5efa8b2af40f3d1127efe68f74243f1bd19b21" }, "node_modules/test-exclude": { "version": "6.0.0", diff --git a/package.json b/package.json index 57e1ae84e..450f8e02d 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#4e5efa8", "uuid": "^9.0.0" }, "scripts": { diff --git a/src/account/accountService.ts b/src/account/accountService.ts index cf5d50661..147c9b502 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 } }