Skip to content

Commit

Permalink
fix: Bump backend and fix resultant type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
David Code Howard committed Oct 4, 2023
1 parent d4f4795 commit 6f672ef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions src/account/accountService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,16 @@ 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
}
}
`);

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' };
Expand Down

0 comments on commit 6f672ef

Please sign in to comment.