diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-03-03 21:46:06 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-03-03 21:46:06 +0100 |
commit | 833c8878d119610cb25f35d712166dfefbf2f4cf (patch) | |
tree | b24d57959f0623b38acad34e856c2a86b10c491c /index.pl | |
parent | ad585c3fec9c937f41b60f484aee6aa5fd65c573 (diff) |
add logout link
Diffstat (limited to 'index.pl')
-rwxr-xr-x | index.pl | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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'); |