]> git.donarmstrong.com Git - debbugs.git/blobdiff - lib/Debbugs/Mojo/Controller/Bug.pm
add first start of mojolicious app (doesn't do much yet)
[debbugs.git] / lib / Debbugs / Mojo / Controller / Bug.pm
diff --git a/lib/Debbugs/Mojo/Controller/Bug.pm b/lib/Debbugs/Mojo/Controller/Bug.pm
new file mode 100644 (file)
index 0000000..939169b
--- /dev/null
@@ -0,0 +1,17 @@
+package Debbugs::Mojo::Controller::Bug;
+
+use Mojo::Base 'Mojolicious::Controller';
+
+use Debbugs::Bug;
+
+sub show {
+    my $c = shift;
+    my $id = $c->stash('bug');
+    my $bug = Debbugs::Bug->new(bug => $id,
+                               schema => $c->db
+                              );
+    
+    return $c->render(text => 'Bug '.$bug->id);
+}
+
+1;