mirror of
https://github.com/stonith404/pingvin-share.git
synced 2025-01-15 01:14:27 -05:00
fix: boolean config variables can't be set to false
This commit is contained in:
parent
b7db9b9b40
commit
39a74510c1
1 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ export class ConfigService {
|
||||||
if (!configVariable || configVariable.locked)
|
if (!configVariable || configVariable.locked)
|
||||||
throw new NotFoundException("Config variable not found");
|
throw new NotFoundException("Config variable not found");
|
||||||
|
|
||||||
if (value == "") {
|
if (value === "") {
|
||||||
value = null;
|
value = null;
|
||||||
} else if (
|
} else if (
|
||||||
typeof value != configVariable.type &&
|
typeof value != configVariable.type &&
|
||||||
|
@ -100,7 +100,7 @@ export class ConfigService {
|
||||||
name: key.split(".")[1],
|
name: key.split(".")[1],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: { value: value ? value.toString() : null },
|
data: { value: value === null ? null : value.toString() },
|
||||||
});
|
});
|
||||||
|
|
||||||
this.configVariables = await this.prisma.config.findMany();
|
this.configVariables = await this.prisma.config.findMany();
|
||||||
|
|
Loading…
Add table
Reference in a new issue