mirror of
https://github.com/stonith404/pingvin-share.git
synced 2024-11-05 07:20:13 +01:00
fix: boolean config variables can't be set to false
This commit is contained in:
parent
b7db9b9b40
commit
39a74510c1
@ -81,7 +81,7 @@ export class ConfigService {
|
||||
if (!configVariable || configVariable.locked)
|
||||
throw new NotFoundException("Config variable not found");
|
||||
|
||||
if (value == "") {
|
||||
if (value === "") {
|
||||
value = null;
|
||||
} else if (
|
||||
typeof value != configVariable.type &&
|
||||
@ -100,7 +100,7 @@ export class ConfigService {
|
||||
name: key.split(".")[1],
|
||||
},
|
||||
},
|
||||
data: { value: value ? value.toString() : null },
|
||||
data: { value: value === null ? null : value.toString() },
|
||||
});
|
||||
|
||||
this.configVariables = await this.prisma.config.findMany();
|
||||
|
Loading…
Reference in New Issue
Block a user