Added login form
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm
index ee19cd7..580ccf3 100644
--- a/lib/Kalamar.pm
+++ b/lib/Kalamar.pm
@@ -124,6 +124,9 @@
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');
+
# Default user is called 'korap'
# $r->route('/user/:user/:collection')
};
diff --git a/lib/Kalamar/Controller/User.pm b/lib/Kalamar/Controller/User.pm
new file mode 100644
index 0000000..691d648
--- /dev/null
+++ b/lib/Kalamar/Controller/User.pm
@@ -0,0 +1,13 @@
+package Kalamar::Controller::User;
+use Mojo::Base 'Mojolicious::Controller';
+
+sub login {
+ my $c = shift;
+ $c->render(json => {
+ response => 'logged in'
+ });
+};
+
+sub logout {};
+
+1;