diff options
author | Daniel Friesel <derf@finalrewind.org> | 2014-12-19 17:46:40 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2014-12-19 17:46:40 +0100 |
commit | 3f75f8f96cde22072b12a479390ae2a2e4b4d009 (patch) | |
tree | 18f7f17451eeaafbf7cf6d6049b6e59eb5252621 /index.pl | |
parent | b654987f0be125c0d09db68337e7be4ac0c04124 (diff) |
add tests for marudor_v1 backend
Diffstat (limited to 'index.pl')
-rw-r--r-- | index.pl | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -402,7 +402,6 @@ sub handle_request { } } elsif ( $template eq 'marudor_v1' ) { - $callback //= 'db_fakedisplay'; my $json = $self->render_to_string( json => { api_version => $api_version, @@ -410,10 +409,18 @@ sub handle_request { version => $VERSION, } ); - $self->render( - data => "$callback($json);", - format => 'json' - ); + if ($callback) { + $self->render( + data => "$callback($json);", + format => 'json' + ); + } + else { + $self->render( + data => $json, + format => 'json' + ); + } } else { $self->render( |