Browse Source

numberize id

vividsnow 12 years ago
parent
commit
64f28b9473
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plack/app.psgi

+ 1 - 1
plack/app.psgi

@@ -12,7 +12,7 @@ my $header = ['Content-Type' => 'application/json'];
 builder {
     mount '/json' => sub { [ 200, $header, [ encode_json({ message => 'Hello, World!' })] ] },
     mount '/dbi' => sub { [ 200, $header, [ encode_json([
-        map { id => $_->[0], randomnumber => $_->[1] },
+        map { id => $_->[0] + 0, randomnumber => $_->[1] },
         grep exists $_->[1],
         map [$_, $sth->execute($_) && $sth->fetchrow_array],
         map int rand 10000 + 1,