Commit | Line | Data |
319537bf |
1 | package Gitalist::Controller::LegacyURI; |
2 | use Moose; |
9c515df2 |
3 | use Moose::Autobox; |
319537bf |
4 | use namespace::autoclean; |
5 | |
6 | BEGIN { extends 'Gitalist::Controller' } |
7 | |
8 | sub handler : Chained('/base') PathPart('legacy') Args() { |
9 | die("Not supported"); |
10 | } |
11 | |
9c515df2 |
12 | sub 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; |