Improved user management routes
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm
index 580ccf3..9cea0b1 100644
--- a/lib/Kalamar.pm
+++ b/lib/Kalamar.pm
@@ -83,7 +83,8 @@
'Search', # Abstract Search framework
'CHI', # Global caching mechanism
'TagHelpers::MailToChiffre', # Obfuscate email addresses
- 'KalamarHelpers' # Specific Helpers for Kalamar
+ 'KalamarHelpers', # Specific Helpers for Kalamar
+ 'KalamarUser' # Specific Helpers for Kalamar
) {
$self->plugin($_);
};
@@ -105,6 +106,7 @@
$r->get('/')->to('search#query')->name('index');
# Collection route
+ # TODO: Probably rename to /corpus
$r->get('/collection')->to('Search#collections')->name('collections');
$r->get('/collection/:id')->to('Search#collection')->name('collection');
@@ -124,8 +126,12 @@
my $match = $text->get('/:match_id');
$match->to('search#match_info')->name('match');
- $r->post('/login')->to('User#login');
- $r->post('/logout')->to('User#logout');
+ # User Management
+ $r->any('/user')->to(controller => 'User');
+ $r->post('/login')->to(action => 'login')->name('login');
+ $r->get('/logout')->to(action => 'logout')->name('logout');
+ $r->any('/register')->to(action => 'register')->name('register');
+ $r->any('/forgotten')->to(action => 'pwdforgotten')->name('pwdforgotten');
# Default user is called 'korap'
# $r->route('/user/:user/:collection')