$ctx->req->uri->path("/legacy$path");
}
if($path =~ s/[.]json$// && $ctx->req->content_type eq 'application/json') {
$ctx->req->uri->path($path);
}
};
around uri_for => su
:Ref
Gitalist::URIStructure::Fragment::WithLog
/;
use File::Type::WebImages ();
use JSON::XS qw/encode_json/;
sub base : Chained('/fragment/repository/find') PathPart('') CaptureArgs(0) {}
sub
tash->{Commit}->sha1,
count => 1,
file => $c->stash->{filename},
);
my $json_obj = !$commit
? { }
: {
sha1 => $commi
};
$c->response->content_type('application/json');
# XXX Make use of the json branch
$c->response->body( encode_json $json_obj );
};
__PACKAGE__->meta->make_immutable;
d');
}
__PACKAGE__->config(
default => 'text/html',
map => {
'application/json' => [qw/ JSON /],
map { $_ => [qw/ View Default /] }
qw( text/css text/html text/pl