소스 검색

numberize id

vividsnow 12 년 전
부모
커밋
64f28b9473
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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,