mirror of
https://gitlab.com/mobicoop/v3/service/configuration.git
synced 2026-01-06 13:52:39 +00:00
Merge branch 'fixBadvalue' into 'main'
Fix bad value assignment See merge request v3/service/configuration!35
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@mobicoop/configuration",
|
||||
"version": "2.5.1",
|
||||
"version": "2.5.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@mobicoop/configuration",
|
||||
"version": "2.5.1",
|
||||
"version": "2.5.2",
|
||||
"license": "AGPL",
|
||||
"dependencies": {
|
||||
"@grpc/grpc-js": "^1.9.9",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mobicoop/configuration",
|
||||
"version": "2.5.1",
|
||||
"version": "2.5.2",
|
||||
"description": "Mobicoop V3 Configuration Service",
|
||||
"author": "sbriat",
|
||||
"private": true,
|
||||
|
||||
@@ -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