mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-12-08 20:29:05 +00:00
fix(server): make system config core singleton (#4392)
* make system config core singleton * refactor * fix tests * chore: fix tests --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
@@ -42,7 +42,7 @@ export class StorageTemplateService {
|
||||
@Inject(IUserRepository) private userRepository: IUserRepository,
|
||||
) {
|
||||
this.storageTemplate = this.compile(config.storageTemplate.template);
|
||||
this.configCore = new SystemConfigCore(configRepository);
|
||||
this.configCore = SystemConfigCore.create(configRepository);
|
||||
this.configCore.addValidator((config) => this.validate(config));
|
||||
this.configCore.config$.subscribe((config) => this.onConfig(config));
|
||||
this.storageCore = new StorageCore(storageRepository);
|
||||
|
||||
Reference in New Issue
Block a user