1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-24 08:52:28 +02:00

feat(server): disable onboarding when config file is set (#6256)

This commit is contained in:
Daniel Dietzler 2024-01-08 16:22:26 +01:00 committed by GitHub
parent 319ddfda53
commit 7cc0904273
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -45,6 +45,15 @@ export class ServerInfoService {
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> {
const libraryBase = StorageCore.getBaseFolder(StorageFolder.LIBRARY);
const diskInfo = await this.storageRepository.checkDiskUsage(libraryBase);

View File

@ -67,7 +67,7 @@ export class AppService {
await this.configService.init();
this.storageService.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)}`);
}