File tree Expand file tree Collapse file tree
src/packages/ce/src/user/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ import {
3535 UsersUpdatePayload
3636} from "@code0-tech/sagittarius-graphql-types" ;
3737import { GraphqlClient } from "@core/util/graphql-client" ;
38- import { withMfaRetry } from "@core/util/mfa" ;
3938import createMutation from "./mutations/User.create.mutation.graphql" ;
4039import updateMutation from "./mutations/User.update.mutation.graphql" ;
4140import loginMutation from "./mutations/User.login.mutation.graphql" ;
@@ -183,22 +182,16 @@ export class UserService extends ReactiveArrayService<User> {
183182 }
184183
185184 async usersUpdate ( payload : UsersUpdateInput ) : Promise < UsersUpdatePayload | undefined > {
186- // usersUpdate may require a fresh MFA confirmation. withMfaRetry transparently
187- // prompts for a code via the shared step-up dialog and retries with the mfa input.
188- const result = await withMfaRetry < UsersUpdatePayload | undefined > ( async ( mfa ) => {
189- const response = await this . client . mutate < Mutation , UsersUpdateInput > ( {
190- mutation : updateMutation ,
191- variables : {
192- ...payload ,
193- ...( mfa ? { mfa} : { } )
194- }
195- } )
196- return response . data ?. usersUpdate ?? undefined
185+ const result = await this . client . mutate < Mutation , UsersUpdateInput > ( {
186+ mutation : updateMutation ,
187+ variables : {
188+ ...payload
189+ }
197190 } )
198191
199- if ( result ?. user ) this . mergeUser ( result . user )
192+ if ( result . data ?. usersUpdate ?. user ) this . mergeUser ( result . data . usersUpdate . user )
200193
201- return result
194+ return result . data ?. usersUpdate ?? undefined
202195 }
203196
204197 /**
You can’t perform that action at this time.
0 commit comments