mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(server): system config (#9484)
This commit is contained in:
parent
42d0fc85ca
commit
7b1112f3e3
24 changed files with 379 additions and 397 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { BadRequestException, Inject, Injectable } from '@nestjs/common';
|
||||
import { instanceToPlain } from 'class-transformer';
|
||||
import _ from 'lodash';
|
||||
import { LogLevel, SystemConfig, defaults } from 'src/config';
|
||||
import {
|
||||
supportedDayTokens,
|
||||
supportedHourTokens,
|
||||
|
|
@ -14,7 +15,6 @@ import {
|
|||
import { SystemConfigCore } from 'src/cores/system-config.core';
|
||||
import { OnServerEvent } from 'src/decorators';
|
||||
import { SystemConfigDto, SystemConfigTemplateStorageOptionDto, mapConfig } from 'src/dtos/system-config.dto';
|
||||
import { LogLevel, SystemConfig } from 'src/entities/system-config.entity';
|
||||
import {
|
||||
ClientEvent,
|
||||
IEventRepository,
|
||||
|
|
@ -56,8 +56,7 @@ export class SystemConfigService {
|
|||
}
|
||||
|
||||
getDefaults(): SystemConfigDto {
|
||||
const config = this.core.getDefaults();
|
||||
return mapConfig(config);
|
||||
return mapConfig(defaults);
|
||||
}
|
||||
|
||||
@OnServerEvent(ServerAsyncEvent.CONFIG_VALIDATE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue