From 6f672ef11ad1c64205ad40e648b5426ab734c469 Mon Sep 17 00:00:00 2001 From: David Code Howard Date: Wed, 4 Oct 2023 16:39:16 -0400 Subject: [PATCH] fix: Bump backend and fix resultant type errors --- package-lock.json | 4 ++-- package.json | 2 +- src/account/accountService.ts | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1fc068983..d20447e9b 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#bbcbc4c", + "terraso-backend": "github:techmatters/terraso-backend#4929e5f", "uuid": "^9.0.0" }, "devDependencies": { @@ -12995,7 +12995,7 @@ }, "node_modules/terraso-backend": { "version": "0.1.0", - "resolved": "git+ssh://git@github.com/techmatters/terraso-backend.git#bbcbc4c9b2a44e6ad25a8c79dcbe3d5781984f9f" + "resolved": "git+ssh://git@github.com/techmatters/terraso-backend.git#4929e5f4599cebc2f107873dd0075885c4df5e46" }, "node_modules/test-exclude": { "version": "6.0.0", diff --git a/package.json b/package.json index e89509a34..d9d504438 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#bbcbc4c", + "terraso-backend": "github:techmatters/terraso-backend#4929e5f", "uuid": "^9.0.0" }, "scripts": { diff --git a/src/account/accountService.ts b/src/account/accountService.ts index 042eb752c..ea6782119 100644 --- a/src/account/accountService.ts +++ b/src/account/accountService.ts @@ -174,8 +174,8 @@ export const checkUserInProject = async ( `); const inProjectQuery = graphql(` - query userExistsInProject($user_InProject: String!) { - users(user_InProject: $user_InProject) { + query userExistsInProject($project: String!) { + users(project: $project) { totalCount } } @@ -183,7 +183,7 @@ export const checkUserInProject = async ( let [userExists, inProject] = await Promise.all([ terrasoApi.requestGraphQL(existQuery, { email: userEmail }), - terrasoApi.requestGraphQL(inProjectQuery, { user_InProject: projectId }), + terrasoApi.requestGraphQL(inProjectQuery, { project: projectId }), ]); if (userExists.users?.edges.length === 0) { return { type: 'NoUser' };