mirror of
https://github.com/dani/vroom.git
synced 2024-06-29 15:03:41 +02:00
Update logout helper to return a hashref
This commit is contained in:
parent
b5d483645c
commit
e9bb0e1137
7
vroom.pl
7
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user