summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
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(