mirror of
https://github.com/ovh/the-bastion.git
synced 2025-01-01 13:01:53 +08:00
fix: json_load(): remove dead code
This commit is contained in:
parent
8cc990ad57
commit
17a38ff960
1 changed files with 0 additions and 10 deletions
|
@ -783,7 +783,6 @@ sub json_load {
|
|||
|
||||
# Check params
|
||||
my $file = $params{'file'};
|
||||
my $keywords = $params{'keywords'} || [];
|
||||
|
||||
if (!$file) {
|
||||
return R('KO_MISSING_PARAMETER', msg => "Missing 'file' parameter");
|
||||
|
@ -829,15 +828,6 @@ sub json_load {
|
|||
return R('KO_INVALID_JSON', msg => "Error while trying to decode JSON configuration from file: $@");
|
||||
}
|
||||
|
||||
# Check that each given keywords are defined
|
||||
my @missing = map { defined($configuration->{$_}) ? () : $_ } keys %$configuration;
|
||||
if (@missing) {
|
||||
return R(
|
||||
'KO_MISSING_CONFIGURATION',
|
||||
value => $configuration,
|
||||
msg => "Configuration is lacking mandatory keywords: " . join(', ', @missing)
|
||||
);
|
||||
}
|
||||
return R('OK', value => $configuration);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue