package MGA::Mirrors::Controller::Validate; use Moose; use namespace::autoclean; BEGIN {extends 'Catalyst::Controller'; } =head1 NAME MGA::Mirrors::Controller::Validate - Catalyst Controller =head1 DESCRIPTION Catalyst Controller. =head1 METHODS =cut =head2 index =cut sub index :Path :Args(0) { my ( $self, $c ) = @_; $c->response->body('Matched MGA::Mirrors::Controller::Validate in Validate.'); } sub validate :Path :Args(1) { my ( $self, $c, $reqid ) = @_; if (my $hostname = $c->model('Mirrors')->apply_change_request($reqid)) { $c->stash->{hostname} = $hostname; } else { $c->stash->{template} = 'validate/error.tt'; } } =head1 AUTHOR Olivier Thauvin =head1 LICENSE This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself. =cut __PACKAGE__->meta->make_immutable; 1;