1
0
Fork 0
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:
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)); 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);

View file

@ -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)}`);
} }