Rearrange JSON file (#868)
This commit is contained in:
parent
5e5cc3f186
commit
5b96200ed6
|
@ -285,7 +285,11 @@ sub newNotification {
|
|||
) . ">$json->{xml}</notification></root>";
|
||||
}
|
||||
else {
|
||||
eval { my $tmp = from_json( $json->{xml} ); $json->{xml} = $tmp; };
|
||||
eval {
|
||||
my $tmp = from_json( $json->{xml} );
|
||||
$json->{$_} = $tmp->{$_} foreach ( keys %$tmp );
|
||||
delete $json->{xml};
|
||||
};
|
||||
if ($@) {
|
||||
$self->lmLog( "Notification malformed $@", 'error' );
|
||||
return $self->sendError( $req, "Notification malformed: $@", 200 );
|
||||
|
|
|
@ -209,9 +209,6 @@ sub toForm {
|
|||
@{ $_->{check} } ];
|
||||
}
|
||||
$_->{id} = "1x$i";
|
||||
foreach my $k ( keys %{ $_->{xml} } ) {
|
||||
$_{$k} = $_->{xml}->{$k};
|
||||
}
|
||||
$_;
|
||||
} @notifs;
|
||||
require HTML::Template;
|
||||
|
|
Loading…
Reference in New Issue
Block a user