my $www = $ctx->{www};
my $env = $ctx->{env};
my $res = $www->news_www->call($env);
- $res->[0] == 404 ? $www->cgit->call($env) : $res;
+ $res = $www->cgit->call($env) if $res->[0] == 404;
+ $res = $www->coderepo->srv($ctx) if $res->[0] == 404;
+ $res;
}
# returns undef if valid, array ref response if invalid
}
}
+sub coderepo {
+ my ($self) = @_;
+ $self->{coderepo} //= do {
+ require PublicInbox::WwwCoderepo;
+ PublicInbox::WwwCoderepo->new($self->{pi_cfg});
+ }
+}
+
# GET $INBOX/manifest.js.gz
sub get_inbox_manifest ($$$) {
my ($ctx, $inbox, $key) = @_;