fix bad value assignment
This commit is contained in:
parent
b33cf3b041
commit
7dcc965f4d
|
@ -29,7 +29,12 @@ export class SetConfigurationService implements ICommandHandler {
|
|||
`${command.value}`,
|
||||
configurationType,
|
||||
);
|
||||
if (isNaN(value)) throw new ArgumentInvalidException('Bad value');
|
||||
if (
|
||||
(configurationType === ConfigurationType.INT ||
|
||||
configurationType === ConfigurationType.FLOAT) &&
|
||||
isNaN(value)
|
||||
)
|
||||
throw new ArgumentInvalidException('Bad value');
|
||||
return await this.configurationRepository.set(
|
||||
command.configurationIdentifier.domain,
|
||||
command.configurationIdentifier.key,
|
||||
|
|
Loading…
Reference in New Issue