Kinda merge legacy uri thing
[catagits/Gitalist.git] / lib / Gitalist / Controller / LegacyURI.pm
CommitLineData
319537bf 1package Gitalist::Controller::LegacyURI;
2use Moose;
9c515df2 3use Moose::Autobox;
319537bf 4use namespace::autoclean;
5
6BEGIN { extends 'Gitalist::Controller' }
7
8sub handler : Chained('/base') PathPart('legacy') Args() {
9 die("Not supported");
10}
11
9c515df2 12sub repository_index : Chained('/base') Args(0) {
13 my ( $self, $c ) = @_;
14
15 $c->response->content_type('text/plain');
16 $c->response->body(
17 join "\n", map $_->name, $c->model()->repositories->flatten
18 ) or die 'No repositories found in '. $c->model->repo_dir;
19}
20
319537bf 21__PACKAGE__->meta->make_immutable;