summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/intentioncloud/Controller/Cloud.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/intentioncloud/Controller/Cloud.pm b/lib/intentioncloud/Controller/Cloud.pm
index 2d96e47..7445441 100644
--- a/lib/intentioncloud/Controller/Cloud.pm
+++ b/lib/intentioncloud/Controller/Cloud.pm
@@ -4,11 +4,23 @@ use strict;
use warnings;
use parent 'Catalyst::Controller';
+sub old_cloud : Regex('^(\d{4})/(\d{2})/(\d{2})/(\w+)/(.*$)') {
+ my ( $self, $c ) = @_;
+ $c->stash->{ template } = 'cloud/old_cloud.tt';
+
+ my $cloud
+ = $c->model( 'DB::Search' )->find( { permalink => $c->req->path } );
+ if ( $cloud ) {
+ $c->stash( cloud => $cloud );
+ } else {
+ }
+}
+
sub search : Local {
my ( $self, $c ) = @_;
$c->stash->{ template } = 'cloud/cloud.tt';
- $c->model( 'Search' )->search($c);
+ $c->model( 'Search' )->search( $c );
}
sub random : Local {