broken refactor but need to leave now...

This commit is contained in:
Oliver Gorwits
2019-03-22 09:10:19 +00:00
parent 3e0af5888c
commit bd9ba3bcb8
6 changed files with 18 additions and 34 deletions

View File

@@ -3,7 +3,6 @@ package App::Netdisco::Web::Plugin;
use Dancer ':syntax';
use Dancer::Plugin;
use App::Netdisco::Util::Web 'request_is_api';
use Path::Class 'dir';
set(
@@ -25,7 +24,7 @@ set(
config->{engines}->{netdisco_template_toolkit}->{INCLUDE_PATH} ||= [ setting('views') ];
register 'bang' => sub {
if (request_is_api()) {
if (request->is_api) {
content_type('application/json');
set serializer => 'JSON';
status $_[1];