mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore(server): eslint await-thenable (#7545)
* await-thenable * fix library watchers * moar eslint * fix test * fix typo * try to remove check void return * fix checksVoidReturn * move to domain utils * remove eslint ignores * chore: cleanup types * chore: use logger * fix: e2e --------- Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
parent
972d5a3411
commit
5d377e5b0f
40 changed files with 133 additions and 110 deletions
|
|
@ -118,7 +118,7 @@ export class SystemConfigService {
|
|||
await this.core.refreshConfig();
|
||||
}
|
||||
|
||||
private async setLogLevel({ logging }: SystemConfig) {
|
||||
private setLogLevel({ logging }: SystemConfig) {
|
||||
const envLevel = this.getEnvLogLevel();
|
||||
const configLevel = logging.enabled ? logging.level : false;
|
||||
const level = envLevel ?? configLevel;
|
||||
|
|
@ -130,7 +130,7 @@ export class SystemConfigService {
|
|||
return process.env.LOG_LEVEL as LogLevel;
|
||||
}
|
||||
|
||||
private async validateConfig(newConfig: SystemConfig, oldConfig: SystemConfig) {
|
||||
private validateConfig(newConfig: SystemConfig, oldConfig: SystemConfig) {
|
||||
if (!_.isEqual(instanceToPlain(newConfig.logging), oldConfig.logging) && this.getEnvLogLevel()) {
|
||||
throw new Error('Logging cannot be changed while the environment variable LOG_LEVEL is set.');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue