mirror of
https://github.com/immich-app/immich.git
synced 2025-01-04 02:46:47 +01:00
feat(server): disable onboarding when config file is set (#6256)
This commit is contained in:
parent
319ddfda53
commit
7cc0904273
2 changed files with 10 additions and 1 deletions
|
@ -45,6 +45,15 @@ export class ServerInfoService {
|
||||||
this.communicationRepository.on('connect', (userId) => this.handleConnect(userId));
|
this.communicationRepository.on('connect', (userId) => this.handleConnect(userId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async init(): Promise<void> {
|
||||||
|
await this.handleVersionCheck();
|
||||||
|
|
||||||
|
const featureFlags = await this.getFeatures();
|
||||||
|
if (featureFlags.configFile) {
|
||||||
|
await this.setAdminOnboarding();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async getInfo(): Promise<ServerInfoResponseDto> {
|
async getInfo(): Promise<ServerInfoResponseDto> {
|
||||||
const libraryBase = StorageCore.getBaseFolder(StorageFolder.LIBRARY);
|
const libraryBase = StorageCore.getBaseFolder(StorageFolder.LIBRARY);
|
||||||
const diskInfo = await this.storageRepository.checkDiskUsage(libraryBase);
|
const diskInfo = await this.storageRepository.checkDiskUsage(libraryBase);
|
||||||
|
|
|
@ -67,7 +67,7 @@ export class AppService {
|
||||||
await this.configService.init();
|
await this.configService.init();
|
||||||
this.storageService.init();
|
this.storageService.init();
|
||||||
await this.libraryService.init();
|
await this.libraryService.init();
|
||||||
await this.serverService.handleVersionCheck();
|
await this.serverService.init();
|
||||||
this.logger.log(`Feature Flags: ${JSON.stringify(await this.serverService.getFeatures(), null, 2)}`);
|
this.logger.log(`Feature Flags: ${JSON.stringify(await this.serverService.getFeatures(), null, 2)}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue