mirror of
https://gitlab.com/mobicoop/v3/service/configuration.git
synced 2026-01-07 20:22:40 +00:00
fix bad value assignment
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user