From e9bb0e1137c73218c719a0ec6a3fd5ddb12091eb Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 14 Oct 2014 19:31:53 +0200 Subject: [PATCH] Update logout helper to return a hashref --- vroom.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vroom.pl b/vroom.pl index 0febcd4..820149f 100755 --- a/vroom.pl +++ b/vroom.pl @@ -108,12 +108,19 @@ helper login => sub { helper logout => sub { my $self = shift; my ($room) = @_; + my $ret = { + status => undef, + msg => undef + }; # Logout from etherpad if ($ec && $self->session($room) && $self->session($room)->{etherpadSessionId}){ $ec->delete_session($self->session($room)->{etherpadSessionId}); } $self->session( expires => 1 ); $self->app->log->info($self->session('name') . " logged out"); + $ret->{status} = 1; + $ret->{msg} = 'LOGOUT_SUCCESS'; + return $ret; }; # Create a new room in the DB