Skip to content

Commit

Permalink
CB-5318 fix: language sync (#2782)
Browse files Browse the repository at this point in the history
Co-authored-by: Evgenia Bezborodova <[email protected]>
  • Loading branch information
Wroud and EvgeniaBzzz authored Jul 16, 2024
1 parent 16e2920 commit 87cd848
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions webapp/packages/core-authentication/src/UserInfoResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { computed, makeObservable, runInAction } from 'mobx';
import { injectable } from '@cloudbeaver/core-di';
import { AutoRunningTask, ISyncExecutor, ITask, SyncExecutor, whileTask } from '@cloudbeaver/core-executor';
import { CachedDataResource, type ResourceKeySimple, ResourceKeyUtils } from '@cloudbeaver/core-resource';
import { SessionDataResource, SessionResource } from '@cloudbeaver/core-root';
import { SessionResource } from '@cloudbeaver/core-root';
import { AuthInfo, AuthLogoutQuery, AuthStatus, GetActiveUserQueryVariables, GraphQLService, UserInfo } from '@cloudbeaver/core-sdk';

import { AUTH_PROVIDER_LOCAL_ID } from './AUTH_PROVIDER_LOCAL_ID';
Expand Down Expand Up @@ -51,8 +51,7 @@ export class UserInfoResource extends CachedDataResource<UserInfo | null, void,
constructor(
private readonly graphQLService: GraphQLService,
private readonly authProviderService: AuthProviderService,
sessionResource: SessionResource,
private readonly sessionDataResource: SessionDataResource,
private readonly sessionResource: SessionResource,
) {
super(() => null, undefined, ['customIncludeOriginDetails', 'includeConfigurationParameters']);

Expand Down Expand Up @@ -111,7 +110,7 @@ export class UserInfoResource extends CachedDataResource<UserInfo | null, void,
if (authInfo.userTokens && authInfo.authStatus === AuthStatus.Success) {
this.resetIncludes();
this.setData(await this.loader());
this.sessionDataResource.markOutdated();
this.sessionResource.markOutdated();
}

return authInfo as AuthInfo;
Expand Down Expand Up @@ -148,7 +147,7 @@ export class UserInfoResource extends CachedDataResource<UserInfo | null, void,
if (authInfo.userTokens && authInfo.authStatus === AuthStatus.Success) {
this.resetIncludes();
this.setData(await this.loader());
this.sessionDataResource.markOutdated();
this.sessionResource.markOutdated();
}

return this.data;
Expand All @@ -167,7 +166,7 @@ export class UserInfoResource extends CachedDataResource<UserInfo | null, void,

this.resetIncludes();
this.setData(await this.loader());
this.sessionDataResource.markOutdated();
this.sessionResource.markOutdated();

return result;
}
Expand Down

0 comments on commit 87cd848

Please sign in to comment.