From: Dietmar Maurer Date: Wed, 18 Jan 2017 12:13:23 +0000 (+0100) Subject: RESTHandler.pm: remove register_page_formatter (no longer required) X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=461273044692eed60788cf2ef9b711206851b029 RESTHandler.pm: remove register_page_formatter (no longer required) --- diff --git a/src/PVE/RESTHandler.pm b/src/PVE/RESTHandler.pm index 6fc69ad..961b253 100644 --- a/src/PVE/RESTHandler.pm +++ b/src/PVE/RESTHandler.pm @@ -249,31 +249,6 @@ sub register_method { push @{$method_registry->{$self}}, $info; } -sub register_page_formatter { - my ($self, %config) = @_; - - my $format = $config{format} || - die "missing format"; - - my $path = $config{path} || - die "missing path"; - - my $method = $config{method} || - die "missing method"; - - my $code = $config{code} || - die "missing formatter code"; - - my $uri_param = {}; - my ($handler, $info) = $self->find_handler($method, $path, $uri_param); - die "unabe to find handler for '$method: $path'" if !($handler && $info); - - die "duplicate formatter for '$method: $path'" - if $info->{formatter} && $info->{formatter}->{$format}; - - $info->{formatter}->{$format} = $code; -} - sub DESTROY {}; # avoid problems with autoload sub AUTOLOAD {