# create shopping list
post '/list' => sub {
- my $req = decode_json(request_data);
+ my $req = request_data;
my $name = $req->{name};
unless ($name) {
length($list_id) and $list_id =~ /^\d{1,18}$/
or return invalid_input('bad list ID');
- my $req = decode_json(request_data);
+ my $req = request_data;
my $descr = $req->{description};
my $done = JSON->boolean( $req->{done} // 0 );
length($item_id) and $item_id =~ /^\d{1,18}$/
or return invalid_input('bad item ID');
- my $req = decode_json(request_data);
+ my $req = request_data;
my $descr = $req->{description};
my $done = JSON->boolean( $req->{done} // 0 );