t;
my $method = shift || 'TO_JSON';
my $config = shift;
if (ref $method && ref $method ne 'CODE') {
$config = $method;
$method = 'TO_JSON';
}
return ext_parcel(
use JSON::MaybeXS;
use Web::Util::ExtPaging;
sub dispatch_request {
my $people_rs = get_rs();
sub (/people) {
[
200,
[ 'Content-type', 'application/json' ],
[ encode_json(ext_paginate($rs->search(undef, { rows => 25 }))) ],
]
},
sub (/people_lite) {
[
200,
[ 'Content-type', 'application/json' ],
[