Skip to content

Commit 58084b9

Browse files
committed
Fix AdminGelService from privatization of CryptoService d1f68df
1 parent faedd82 commit 58084b9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/components/admin/admin.gel.service.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import {
33
Injectable,
44
type OnApplicationBootstrap,
55
} from '@nestjs/common';
6+
import { ModuleRef } from '@nestjs/core';
7+
import { LazyGetter as Once } from 'lazy-get-decorator';
68
import { CryptoService } from '~/core/authentication/crypto.service';
79
import { ConfigService } from '~/core/config/config.service';
810
import { ILogger, Logger } from '~/core/logger';
@@ -13,11 +15,15 @@ import { AdminRepository } from './admin.repository';
1315
export class AdminGelService implements OnApplicationBootstrap {
1416
constructor(
1517
private readonly config: ConfigService,
16-
private readonly crypto: CryptoService,
1718
@Inject(AdminRepository) private readonly repo: AdminGelRepository,
19+
private readonly moduleRef: ModuleRef,
1820
@Logger('admin:service') private readonly logger: ILogger,
1921
) {}
2022

23+
@Once() private get crypto() {
24+
return this.moduleRef.get(CryptoService, { strict: false });
25+
}
26+
2127
async onApplicationBootstrap(): Promise<void> {
2228
const finishing = this.repo.finishing(() => this.setupRootUser());
2329
// Wait for root object setup when running tests, else just let it run in

0 commit comments

Comments
 (0)