Added login form
Change-Id: Ia297cfffdeb289363d9fee4e6751e9afa6a3f9d8
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm
index 4dfb35d..9623a81 100644
--- a/lib/Kalamar.pm
+++ b/lib/Kalamar.pm
@@ -128,6 +128,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;