refactor(server): simplify config init process (#5702)

This commit is contained in:
Jason Rasmussen
2024-01-01 13:16:44 -05:00
committed by GitHub
parent 5f6d09d3da
commit 03eb5ffc5c
8 changed files with 35 additions and 35 deletions

View File

@@ -19,7 +19,7 @@ import { SharedLinkService } from './shared-link';
import { SmartInfoService } from './smart-info';
import { StorageService } from './storage';
import { StorageTemplateService } from './storage-template';
import { INITIAL_SYSTEM_CONFIG, SystemConfigService } from './system-config';
import { SystemConfigService } from './system-config';
import { TagService } from './tag';
import { UserService } from './user';
@@ -47,14 +47,6 @@ const providers: Provider[] = [
TagService,
UserService,
ImmichLogger,
{
provide: INITIAL_SYSTEM_CONFIG,
inject: [SystemConfigService, DatabaseService],
useFactory: async (configService: SystemConfigService, databaseService: DatabaseService) => {
await databaseService.init();
return configService.getConfig();
},
},
];
@Global()