summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-12-19 17:46:40 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-12-19 17:46:40 +0100
commit3f75f8f96cde22072b12a479390ae2a2e4b4d009 (patch)
tree18f7f17451eeaafbf7cf6d6049b6e59eb5252621 /index.pl
parentb654987f0be125c0d09db68337e7be4ac0c04124 (diff)
add tests for marudor_v1 backend
Diffstat (limited to 'index.pl')
-rw-r--r--index.pl17
1 files changed, 12 insertions, 5 deletions
diff --git a/index.pl b/index.pl
index 86efa5e..c311f20 100644
--- a/index.pl
+++ b/index.pl
@@ -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(