From 4875037269702e9e4195d01e2711b489c40ad0e9 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 18 Feb 2011 00:12:12 -0600 Subject: allow viewing page history --- lib/Narwhal.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/Narwhal.pm') diff --git a/lib/Narwhal.pm b/lib/Narwhal.pm index 4437027..9c0f099 100644 --- a/lib/Narwhal.pm +++ b/lib/Narwhal.pm @@ -42,6 +42,13 @@ router as { route '/edit/:page_name' => 'http-method:edit', ( page_name => { isa => 'Str' }, ); + route '/page/:page_name/:rev' => 'wiki.old_page', ( + page_name => { isa => 'Str' }, + rev => { isa => qr/^[0-9a-f]{40}$/ }, + ); + route '/history/:page_name' => 'wiki.history', ( + page_name => { isa => 'Str' }, + ); }, ( redirect => depends_on('/Component/Redirect'), wiki => depends_on('/Component/Wiki'), -- cgit v1.2.3-54-g00ecf