summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
Diffstat (limited to 'index.pl')
-rwxr-xr-xindex.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/index.pl b/index.pl
index f8b2084..492dc29 100755
--- a/index.pl
+++ b/index.pl
@@ -504,7 +504,7 @@ helper 'get_user_id' => sub {
else {
$self->app->add_user_query->execute($user_name);
$self->app->get_userid_query->execute($user_name);
- my $rows = $self->app->get_userid_query->fetchall_arrayref;
+ $rows = $self->app->get_userid_query->fetchall_arrayref;
return $rows->[0][0];
}
};
@@ -837,6 +837,12 @@ post '/x/login' => sub {
}
};
+get '/x/logout' => sub {
+ my ($self) = @_;
+ $self->logout;
+ $self->redirect_to('/x/login');
+};
+
get '/x/register' => sub {
my ($self) = @_;
$self->render('register');