mirror of
https://github.com/immich-app/immich.git
synced 2025-12-22 17:24:56 +03:00
refactor(server): simplify config init process (#5702)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user