Skip to content

Commit

Permalink
numberize id
Browse files Browse the repository at this point in the history
  • Loading branch information
vividsnow committed Apr 17, 2013
1 parent 1985150 commit 7eb5b4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plack/app.psgi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7eb5b4d

Please sign in to comment.