Skip to content

Commit

Permalink
Fix return removeUserWithEmail
Browse files Browse the repository at this point in the history
  • Loading branch information
rbussola committed Jan 28, 2025
1 parent 5ddca25 commit 0039327
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Fix return from `removeUserWithEmail`

## [0.63.2] - 2024-12-19
### Fixed
Expand Down
7 changes: 5 additions & 2 deletions node/resolvers/Mutations/Users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,15 @@ const Users = {
vtex: { logger },
} = ctx as any

storefrontPermissionsClient
return storefrontPermissionsClient
.getUsersByEmail(email, orgId, costId)
.then((result: any) => {
const user = result.data.getUsersByEmail[0]

if (!user) return
if (!user) {
logger.error({ message: 'User not found' })
return { status: 'error', message: 'User not found' }
}

const { id } = user
const { userId } = user
Expand Down

0 comments on commit 0039327

Please sign in to comment.