refactor(server): system config (#9484)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user