mirror of
https://github.com/dani/vroom.git
synced 2024-06-02 05:21:39 +02:00
Check if room exists in the goodbye route
This commit is contained in:
parent
072215a071
commit
e4ce4b9678
|
@ -306,6 +306,13 @@ get 'feedback_thanks' => 'feedback_thanks';
|
|||
get '/goodby/(:room)' => sub {
|
||||
my $self = shift;
|
||||
my $room = $self->stash('room');
|
||||
if (!$self->get_room($room)){
|
||||
return $self->render('error',
|
||||
err => 'ERROR_ROOM_s_DOESNT_EXIST',
|
||||
msg => sprintf ($self->l("ERROR_ROOM_s_DOESNT_EXIST"), $room),
|
||||
room => $room
|
||||
);
|
||||
}
|
||||
$self->remove_participant($room,$self->session('name'));
|
||||
$self->logout;
|
||||
} => 'goodby';
|
||||
|
|
Loading…
Reference in New Issue
Block a user